1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-06 19:02:33 +01:00
server/api/jest/globalSetup.js

16 lines
394 B
JavaScript
Raw Normal View History

2021-09-18 01:50:29 +02:00
const fs = require("fs");
const path = require("path");
const { FosscordServer } = require("../dist/Server");
const Server = new FosscordServer({ port: 3001 });
global.server = Server;
module.exports = async () => {
try {
fs.unlinkSync(path.join(__dirname, "..", "database.db"));
} catch {}
return await Server.start();
};
// afterAll(async () => {
// return await Server.stop();
// });