summary refs log tree commit diff
path: root/api/scripts
diff options
context:
space:
mode:
authorxnacly <matteogropp@protonmail.com>2021-08-30 16:21:54 +0200
committerxnacly <matteogropp@protonmail.com>2021-08-30 16:21:54 +0200
commit9e4c7d119b3feb7a9d63a31c162b88b6839d75f9 (patch)
tree55076cf6ad127c080e212b4cb9ad0a4466302a06 /api/scripts
parentadded jest config, installed supertest (diff)
downloadserver-9e4c7d119b3feb7a9d63a31c162b88b6839d75f9.tar.xz
added setup for jest tests
Diffstat (limited to 'api/scripts')
-rw-r--r--api/scripts/setup_test.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/api/scripts/setup_test.js b/api/scripts/setup_test.js

index 4b692f7c..95bf2e40 100644 --- a/api/scripts/setup_test.js +++ b/api/scripts/setup_test.js
@@ -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(); +// });