テストがうごかないのを修正 (#7566)

* startServer

* typeorm 0.2.32

* Fix: chartのテストがテストの並び順によっては正しく初期化されない

* initTestDb
This commit is contained in:
MeiMei
2021-06-12 22:40:17 +09:00
committed by GitHub
parent 334ca01092
commit c071467b6a
11 changed files with 91 additions and 75 deletions

View File

@ -12,7 +12,7 @@ process.env.NODE_ENV = 'test';
import * as assert from 'assert';
import * as childProcess from 'child_process';
import { async, launchServer, signup, post, request, simpleGet, port, shutdownServer } from './utils';
import { async, startServer, signup, post, request, simpleGet, port, shutdownServer } from './utils';
import * as openapi from '@redocly/openapi-core';
// Request Accept
@ -32,12 +32,13 @@ describe('Fetch resource', () => {
let alice: any;
let alicesPost: any;
before(launchServer(g => p = g, async () => {
before(async () => {
p = await startServer();
alice = await signup({ username: 'alice' });
alicesPost = await post(alice, {
text: 'test'
});
}));
});
after(async () => {
await shutdownServer(p);