summary refs log tree commit diff
path: root/api/scripts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-02 00:14:34 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-02 00:14:34 +0200
commitf056885fb087d4c6b8dcf19d68d0c9871f3e8609 (patch)
treeb6b46f18cc9583625d5cfd37301896d081144f7f /api/scripts
parent:arrow_up: update dependencies (diff)
parentadded /login unittest (diff)
downloadserver-f056885fb087d4c6b8dcf19d68d0c9871f3e8609.tar.xz
Merge branch 'master' of https://github.com/fosscord/fosscord-api
Diffstat (limited to 'api/scripts')
-rw-r--r--api/scripts/globalSetup.js (renamed from api/scripts/setup_test.js)7
1 files changed, 4 insertions, 3 deletions
diff --git a/api/scripts/setup_test.js b/api/scripts/globalSetup.js

index 95bf2e40..76cd8e0d 100644 --- a/api/scripts/setup_test.js +++ b/api/scripts/globalSetup.js
@@ -1,12 +1,13 @@ const fs = require("fs"); const { FosscordServer } = require("../dist/Server"); const Server = new FosscordServer({ port: 3001 }); -(async () => { +global.server = Server; +module.exports = async () => { try { - fs.unlinkSync(`${__dirname}/database.db`); + fs.unlinkSync(`${__dirname}/../database.db`); } catch {} return await Server.start(); -})(); +}; // afterAll(async () => { // return await Server.stop();