Skip to content

Commit

Permalink
test: Changing test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxNB committed Feb 3, 2022
1 parent 32038e7 commit 60de58a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions tests/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const {derver} = require('derver');

derver({
dir: 'www',
port: 5050,
spa: true,
watch: false,
});

0 comments on commit 60de58a

Please sign in to comment.