added setup for jest tests

This commit is contained in:
xnacly
2021-08-30 16:21:54 +02:00
parent 503c0d7b60
commit d107c66358
3 changed files with 16 additions and 2 deletions
+13 -1
View File
@@ -1 +1,13 @@
// TODO: start api
const fs = require("fs");
const { FosscordServer } = require("../dist/Server");
const Server = new FosscordServer({ port: 3001 });
(async () => {
try {
fs.unlinkSync(`${__dirname}/database.db`);
} catch {}
return await Server.start();
})();
// afterAll(async () => {
// return await Server.stop();
// });