Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: read ESLINT_MOCHA_TIMEOUT env var in Makefile.js #15626

Merged
merged 1 commit into from Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
snitin315 marked this conversation as resolved.
Show resolved Hide resolved