From 8a785da5e4430dc51a5af7b40a2a6fe2f495d778 Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 12 Dec 2025 23:58:59 +0100 Subject: Fix CI tests --- scripts/test.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'scripts/test.js') 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); -- cgit 1.5.1