Try to optimise initial connection speed in tests.

This commit is contained in:
zkldi
2021-10-29 00:13:10 +01:00
parent 24ae9a5f08
commit d2be127ca8
2 changed files with 6 additions and 1 deletions
+4 -1
View File
@@ -1,3 +1,6 @@
import { monkDB } from "external/mongo/db";
import { SetIndexesForDB } from "./resets";
SetIndexesForDB().then(() => process.exit(0));
SetIndexesForDB()
.then(monkDB.close)
.then(() => process.exit(0));
@@ -3,6 +3,8 @@ import path from "path";
import t from "tap";
import { CloseAllConnections } from "./close-connections";
import "external/mongo/db";
const files = glob.sync(path.join(__dirname, "../../", "**/*.test.ts"));
process.env.NODE_PATH = path.join(__dirname, "../../");