File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
docs-next/src/content/docs/explainers Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -29,5 +29,7 @@ More information can be found in the [Node.js documentation](https://nodejs.org/
2929- [ Watch mode] ( ../running/cli#--watch--w ) does not support ES Module test files
3030- [ Custom reporters] ( ../reporters/third-party ) and [ custom interfaces] ( ../interfaces/third-party ) can only be CommonJS files
3131- [ Configuration file] ( ../running/configuring ) can only be a CommonJS file (` .mocharc.js ` or ` .mocharc.cjs ` )
32+ - Mocha in Node.js version 24.4.0 or older [ silently ignored top level errors in ESM files] ( https://github.com/mochajs/mocha/issues/5396 ) .
33+ If you cannot upgrade to a newer Node.js version, you can add ` --no-experimental-require-module ` to the ` NODE_OPTIONS ` environment variable.
3234- When using module-level mocks via libs like ` proxyquire ` , ` rewiremock ` or ` rewire ` , hold off on using ES modules for your test files.
3335 You can switch to using ` testdouble ` , which does support ESM.
Original file line number Diff line number Diff line change @@ -2131,6 +2131,8 @@ More information can be found in the [Node.js documentation](https://nodejs.org/
21312131- [ Custom reporters] ( #third-party-reporters ) and [ custom interfaces] ( #interfaces )
21322132 can only be CommonJS files
21332133- [ Configuration file] ( #configuring-mocha-nodejs ) can only be a CommonJS file (` .mocharc.js ` or ` .mocharc.cjs ` )
2134+ - Mocha in Node.js version 24.4.0 or older [ silently ignored top level errors in ESM files] ( https://github.com/mochajs/mocha/issues/5396 ) .
2135+ If you cannot upgrade to a newer Node.js version, you can add ` --no-experimental-require-module ` to the ` NODE_OPTIONS ` environment variable.
21342136- When using module-level mocks via libs like ` proxyquire ` , ` rewiremock ` or ` rewire ` ,
21352137 hold off on using ES modules for your test files. You can switch to using ` testdouble ` ,
21362138 which does support ESM.
You can’t perform that action at this time.
0 commit comments