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

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