|
|
@ -5,7 +5,7 @@ import MysqlConnectionManager from "../src/db/MysqlConnectionManager"; |
|
|
|
import config from "config"; |
|
|
|
|
|
|
|
|
|
|
|
export default function useApp(appSupplier?: (addr: string, port: number) => Promise<TestApp>): void { |
|
|
|
export default function useApp(appSupplier?: AppSupplier): void { |
|
|
|
let app: Application; |
|
|
|
|
|
|
|
beforeAll(async (done) => { |
|
|
@ -14,7 +14,7 @@ export default function useApp(appSupplier?: (addr: string, port: number) => Pro |
|
|
|
await MysqlConnectionManager.endPool(); |
|
|
|
|
|
|
|
await setupMailServer(); |
|
|
|
app = appSupplier ? await appSupplier('127.0.0.1', 8966) : new TestApp('127.0.0.1', 8966); |
|
|
|
app = appSupplier ? await appSupplier('127.0.0.1', 8966) : new TestApp('127.0.0.1', 8966, true); |
|
|
|
|
|
|
|
await app.start(); |
|
|
|
done(); |
|
|
@ -39,3 +39,5 @@ export default function useApp(appSupplier?: (addr: string, port: number) => Pro |
|
|
|
done(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
export type AppSupplier = (addr: string, port: number) => Promise<TestApp>; |