summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-12 23:58:59 +0100
committerRory& <root@rory.gay>2025-12-12 23:58:59 +0100
commit8a785da5e4430dc51a5af7b40a2a6fe2f495d778 (patch)
tree1a57fa581fb5dcc105474551145ac0a99575b9ff /scripts
parentMore instance ban stuff (diff)
downloadserver-ts-8a785da5e4430dc51a5af7b40a2a6fe2f495d778.tar.xz
Fix CI tests
Diffstat (limited to 'scripts')
-rw-r--r--scripts/test.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/test.js b/scripts/test.js

index 69e9fdd6..c79e336f 100644 --- a/scripts/test.js +++ b/scripts/test.js
@@ -23,10 +23,21 @@ const { spawn } = require("child_process"); const path = require("path"); +const fs = require("fs"); -const server = spawn("node", [ - path.join(__dirname, "..", "dist", "bundle", "start.js"), -]); +const cfgFile = path.join(__dirname, "test_config.json"); +process.env.CONFIG_PATH = cfgFile; + +fs.writeFileSync( + cfgFile, + JSON.stringify({ + api: { endpointPublic: "http://localhost:3001/api/v9/" }, + cdn: { endpointPublic: "http://localhost:3001/", endpointPrivate: "http://localhost:3001/" }, + gateway: { endpointPublic: "ws://localhost:3001/" }, + }), +); + +const server = spawn("node", [path.join(__dirname, "..", "dist", "bundle", "start.js")]); server.stdout.on("data", (data) => { process.stdout.write(data);