fixed globalSetup for jest

This commit is contained in:
xnacly 2021-09-01 22:10:44 +02:00
parent e8ff7498c6
commit 26be2f9a1d
2 changed files with 4 additions and 3 deletions

View File

@ -1,12 +1,13 @@
const fs = require("fs");
const { FosscordServer } = require("../dist/Server");
const Server = new FosscordServer({ port: 3001 });
(async () => {
global.server = Server;
module.exports = async () => {
try {
fs.unlinkSync(`${__dirname}/database.db`);
fs.unlinkSync(`${__dirname}/../database.db`);
} catch {}
return await Server.start();
})();
};
// afterAll(async () => {
// return await Server.stop();

BIN
cdn/package-lock.json generated

Binary file not shown.