Newer
Older
percord / api / scripts / globalSetup.js
@xnacly xnacly on 1 Sep 2021 352 bytes fixed globalSetup for jest
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();
// });