Skip to content

Commit 11c8580

Browse files
authored
chore: read ESLINT_MOCHA_TIMEOUT env var in Makefile.js (#15626)
Closes #15582
1 parent b93af98 commit 11c8580

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Makefile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const NODE = "node ", // intentional extra space
7979
PERF_MULTIFILES_TARGETS = `"${PERF_MULTIFILES_TARGET_DIR + path.sep}{lib,tests${path.sep}lib}${path.sep}**${path.sep}*.js"`,
8080

8181
// Settings
82-
MOCHA_TIMEOUT = 10000;
82+
MOCHA_TIMEOUT = parseInt(process.env.ESLINT_MOCHA_TIMEOUT, 10) || 10000;
8383

8484
//------------------------------------------------------------------------------
8585
// Helpers

docs/developer-guide/unit-tests.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ Running individual tests is useful when you're working on a specific bug and ite
3737
## More Control on Unit Testing
3838

3939
`npm run test:cli` is an alias of the Mocha cli in `./node_modules/.bin/mocha`. [Options](https://mochajs.org/#command-line-usage) are available to be provided to help to better control the test to run.
40+
41+
The default timeout for tests in `npm test` is 10000ms. You may change the timeout by providing `ESLINT_MOCHA_TIMEOUT` environment variable, for example:
42+
43+
ESLINT_MOCHA_TIMEOUT=20000 npm test

0 commit comments

Comments
 (0)