Skip to content

Commit

Permalink
chore: read ESLINT_MOCHA_TIMEOUT env var in Makefile.js (eslint#15626)
Browse files Browse the repository at this point in the history
  • Loading branch information
piggynl authored and srijan-deepsource committed May 30, 2022
1 parent 47b44b4 commit d5eae6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.js
Expand Up @@ -79,7 +79,7 @@ const NODE = "node ", // intentional extra space
PERF_MULTIFILES_TARGETS = `"${PERF_MULTIFILES_TARGET_DIR + path.sep}{lib,tests${path.sep}lib}${path.sep}**${path.sep}*.js"`,

// Settings
MOCHA_TIMEOUT = 10000;
MOCHA_TIMEOUT = parseInt(process.env.ESLINT_MOCHA_TIMEOUT, 10) || 10000;

//------------------------------------------------------------------------------
// Helpers
Expand Down
4 changes: 4 additions & 0 deletions docs/developer-guide/unit-tests.md
Expand Up @@ -37,3 +37,7 @@ Running individual tests is useful when you're working on a specific bug and ite
## More Control on Unit Testing

`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.

The default timeout for tests in `npm test` is 10000ms. You may change the timeout by providing `ESLINT_MOCHA_TIMEOUT` environment variable, for example:

ESLINT_MOCHA_TIMEOUT=20000 npm test

0 comments on commit d5eae6d

Please sign in to comment.