-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Labels
area: repository toolingconcerning ease of contributionconcerning ease of contributionstatus: accepting prsMocha can use your help with this one!Mocha can use your help with this one!
Description
Tooling Suggestion Checklist
- I have tried restarting my IDE and the issue persists.
- I have pulled the latest
main
branch of the repository. - I have read and agree to Mocha's Code of Conduct and Contributing Guidelines
- I have searched for related issues and issues with the
faq
label, but none matched my issue. - I want to provide a PR to resolve this
Overview
Example for test-node:unit
, https://github.com/mochajs/mocha/actions/runs/12577202344/job/35054634613:
1) ParallelBuffered
event
on EVENT_RUN_END
should remove all listeners:
TypeError: Cannot read properties of undefined (reading 'length')
at arrayClone (node:events:894:15)
at unwrapListeners (node:events:905:15)
at _listeners (node:events:803:5)
at EventEmitter.listeners (node:events:813:10)
at Context.<anonymous> (test/node-unit/reporters/parallel-buffered.spec.js:105:23)
at callFn (lib/runnable.js:110:584)
at Runnable.run (lib/runnable.js:110:57)
at Runner.runTest (lib/runner.js:182:1028)
at /home/runner/work/mocha/mocha/lib/runner.js:210:639
at next (lib/runner.js:159:412)
at /home/runner/work/mocha/mocha/lib/runner.js:159:789
at next (lib/runner.js:147:565)
at Immediate._onImmediate (lib/runner.js:151:1226)
at process.processImmediate (node:internal/timers:491:21)
Example for test-node:integration`, https://github.com/mochajs/mocha/actions/runs/12577202344/job/35054634364:
1) esm
should throw an ERR_MODULE_NOT_FOUND and not ERR_REQUIRE_ESM if file imports a non-existing module:
expected '\n Exception during run: Error [ERR_REQUIRE_CYCLE_MODULE]: Cannot require() ES Module /home/runner/work/mocha/mocha/test/integration/fixtures/esm/type-module/test-that-imports-non-existing-module.fixture.js in a cycle. (from /home/runner/work/mocha/mocha/lib/nodejs/esm-utils.js)\n at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:315:15)\n at loadESMFromCJS (node:internal/modules/cjs/loader:1414:24)\n at Module._compile (node:internal/modules/cjs/loader:1547:5)\n at Module.replacementCompile (/home/runner/work/mocha/mocha/node_modules/append-transform/index.js:60:13)\n at node:internal/modules/cjs/loader:1677:16\n at Object.<anonymous> (/home/runner/work/mocha/mocha/node_modules/append-transform/index.js:64:4)\n at Module.load (node:internal/modules/cjs/loader:1318:32)\n at Function._load (node:internal/modules/cjs/loader:1128:12)\n at TracingChannel.traceSync (node:diagnostics_channel:322:14)\n at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)\n at Module.require (node:internal/modules/cjs/loader:1340:12)\n at require (node:internal/modules/helpers:138:16)\n at exports.requireOrImport (/home/runner/work/mocha/mocha/lib/nodejs/esm-utils.js:10:8)\n at async exports.loadFilesAsync (/home/runner/work/mocha/mocha/lib/nodejs/esm-utils.js:21:688)\n at async singleRun (/home/runner/work/mocha/mocha/lib/cli/run-helpers.js:55:26)\n at async exports.handler (/home/runner/work/mocha/mocha/lib/cli/run.js:19:452) {\n code: \'ERR_REQUIRE_CYCLE_MODULE\'\n}\n'
to contain 'ERR_MODULE_NOT_FOUND'
Additional Info
#5165 -> 8f1c8d8 is the first commit on main
that shows these complaints. It had a passing CI build and was up-to-date with the latest main
. Also, the complaints are popping up in other PRs too, such as #5275. So this must be something introduced outside of our commits.
Metadata
Metadata
Assignees
Labels
area: repository toolingconcerning ease of contributionconcerning ease of contributionstatus: accepting prsMocha can use your help with this one!Mocha can use your help with this one!