diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-02 00:14:34 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-02 00:14:34 +0200 |
commit | f056885fb087d4c6b8dcf19d68d0c9871f3e8609 (patch) | |
tree | b6b46f18cc9583625d5cfd37301896d081144f7f /api/scripts | |
parent | :arrow_up: update dependencies (diff) | |
parent | added /login unittest (diff) | |
download | server-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(); |