diff --git a/tests/environment.js b/tests/environment.js index 1fb258c..3e4a2f8 100644 --- a/tests/environment.js +++ b/tests/environment.js @@ -6,8 +6,9 @@ async function setup(context) { console.log('Launching test server...'); if(!(await ports.check(5050))) throw new Error("Port 5050 already in use, can't launch test server.") - context.srv = spawn('derver', ['--no-watch','--spa','--port=5050','tests/www'],{ - detached: false + context.srv = spawn('node',['server.js'],{ + detached: false, + cwd: 'tests' }); process.on("exit", () => context.srv.kill()); await ports.wait(5050); diff --git a/tests/server.js b/tests/server.js new file mode 100644 index 0000000..6a15d62 --- /dev/null +++ b/tests/server.js @@ -0,0 +1,8 @@ +const {derver} = require('derver'); + +derver({ + dir: 'www', + port: 5050, + spa: true, + watch: false, +}); \ No newline at end of file