Run server on different port when running tests
This commit is contained in:
@@ -12,7 +12,7 @@ beforeAll(async () => {
|
||||
});
|
||||
|
||||
it('loads the page', async () => {
|
||||
await driver.get("http://localhost:8080");
|
||||
await driver.get("http://localhost:3005");
|
||||
|
||||
expect(await driver.getTitle()).toEqual('Infantry Combat Solo Basic');
|
||||
});
|
||||
@@ -2,20 +2,12 @@ console.log("\nSpawning server process...");
|
||||
const { spawn } = require("child_process");
|
||||
|
||||
module.exports = async function () {
|
||||
const child = spawn("node", ["dev-server.cjs"]);
|
||||
const child = spawn("node", ["dev-server.cjs", "--test"]);
|
||||
|
||||
child.stdout.on('data', (data) => {
|
||||
console.log(`${data}`);
|
||||
});
|
||||
|
||||
// child.stderr.on('data', (data) => {
|
||||
// console.error(`stderr: ${data}`);
|
||||
// });
|
||||
|
||||
// child.on('close', (code) => {
|
||||
// console.log(`child process exited with code ${code}`);
|
||||
// });
|
||||
|
||||
globalThis.__INTEG_TEST_SERVER_PID__ = child.pid;
|
||||
|
||||
child.stderr.on("data", (data) => {
|
||||
Reference in New Issue
Block a user