Skip to content

Commit b7984ab

Browse files
committed
chore: Add npm command for running the multi-tab tests with the required dev server running
1 parent 5d2955a commit b7984ab

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

bin/test-multitab.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
3+
const { spawn } = require('child_process');
4+
const devserver = require('./dev-server');
5+
6+
const MOCHA_BIN = './node_modules/.bin/mocha';
7+
const MULTITAB_TESTS = 'tests/multitab';
8+
const TIMEOUT = '10000'
9+
10+
devserver.start(() => {
11+
let argv = ['-t', TIMEOUT, MULTITAB_TESTS];
12+
let mocha = spawn(MOCHA_BIN, argv, { stdio: 'inherit' });
13+
mocha.on('close', (status) => process.exit(status));
14+
});

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"test-component": "mocha --exit tests/component # --exit for #8839",
1414
"test-fuzzy": "TYPE=fuzzy npm run test",
1515
"test-browser": "node ./bin/test-browser.js",
16+
"test-multitab": "node ./bin/test-multitab.js",
1617
"test-memleak": "mocha -gc tests/memleak",
1718
"eslint": "eslint --cache bin/ packages/node_modules/**/src tests/",
1819
"dev": "./bin/run-dev.sh",

0 commit comments

Comments
 (0)