Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jest.config.integ.cjs8
-rw-r--r--src/index.js2
-rw-r--r--test/integration/page.test.js2
-rw-r--r--test/integration/setup.cjs12
4 files changed, 12 insertions, 12 deletions
diff --git a/jest.config.integ.cjs b/jest.config.integ.cjs
index 1b7b6a9..0b50bae 100644
--- a/jest.config.integ.cjs
+++ b/jest.config.integ.cjs
@@ -1,8 +1,8 @@
-console.log("Jest config file read.");
+console.log('Jest config file read.');
module.exports = {
- globalSetup: "./test/integration/setup.cjs",
- globalTeardown: "./test/integration/teardown.cjs",
- testPathIgnorePatterns: ["/node_modules/", "test/unit"],
+ globalSetup: './test/integration/setup.cjs',
+ globalTeardown: './test/integration/teardown.cjs',
+ testPathIgnorePatterns: ['/node_modules/', 'test/unit'],
testTimeout: 5000
};
diff --git a/src/index.js b/src/index.js
index 800eea7..01ebd89 100644
--- a/src/index.js
+++ b/src/index.js
@@ -3,7 +3,7 @@ import * as gameboard from './modules/gameboard.js';
import * as recordSheet from './modules/record_sheet.js';
import * as mapSelectDialog from './modules/map_select_dialog.js';
-globalThis.svgns = "http://www.w3.org/2000/svg";
+globalThis.svgns = 'http://www.w3.org/2000/svg';
const mapPlaceholder = document.querySelector('.map-placeholder'),
distanceOutput = document.getElementById('status'),
diff --git a/test/integration/page.test.js b/test/integration/page.test.js
index 7a987f7..9dfe828 100644
--- a/test/integration/page.test.js
+++ b/test/integration/page.test.js
@@ -11,7 +11,7 @@ let driver;
beforeEach(async () => {
driver = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
- await driver.get("http://localhost:3005");
+ await driver.get('http://localhost:3005');
});
it('loads the page', async () => {
diff --git a/test/integration/setup.cjs b/test/integration/setup.cjs
index a03d7de..2ea9e63 100644
--- a/test/integration/setup.cjs
+++ b/test/integration/setup.cjs
@@ -1,8 +1,8 @@
-console.log("\nSpawning server process...");
-const { spawn } = require("child_process");
+console.log('\nSpawning server process...');
+const { spawn } = require('child_process');
module.exports = async function () {
- const child = spawn("node", ["server.cjs"]);
+ const child = spawn('node', ['server.cjs']);
child.stdout.on('data', (data) => {
console.log(`${data}`);
@@ -10,10 +10,10 @@ module.exports = async function () {
globalThis.__INTEG_TEST_SERVER_PID__ = child.pid;
- child.stderr.on("data", (data) => {
+ child.stderr.on('data', (data) => {
const str = data.toString();
- console.log("[server]", str);
- if (str.includes("localhost:3005")) {
+ console.log('[server]', str);
+ if (str.includes('localhost:3005')) {
setTimeout(resolve, 200);
}
});