Mark Wiemer
Mark Wiemer
@JoshuaKGoldberg OK, I'm able to reproduce consistently with 22.19.0 and 24.9.0. Let's see what I can do here...
First bad commit comes from https://github.com/mochajs/mocha/pull/5408 This command passes consistently and is a simplified form of what's in our CI: ```sh npx nyc node bin/mocha.js --grep "module with a loader"...
`nyc` is preloading its own modules, causing the different behavior: ``` DEBUG=mocha:runner npx nyc node ./bin/mocha ./test/integration/esm.spec.js --grep "module with a loader" --timeout 3000 ``` Output includes `_preload_modules: [Array]`, which...
## Summary Tests pass in CI because, when Mocha is wrapped by `nyc`, the Node loader defaults to module mode and allows `import` statements. Tests will pass locally when run...
Updated my learning branch: https://github.com/mochajs/mocha/compare/fix-5361-esm-loader, making progress but need to go slowly here, everything is very very finnicky :D Goal is to learn how to force Node to load files...
Codecov failed a few times in one run, but succeeded other times in that same run. We'll have to learn more about this, hopefully it doesn't become common... https://github.com/mochajs/mocha/pull/5397
Hmm, I think we can ignore the CLA issue as the non-signer is AI :D
I'll review this in more detail sometime in the next ~7 days :)
Took me a minute to remember I needed to actively add the `--fail-hook-affected-tests` flag to see the new behavior :D was able to repro locally and the code does look...
@akshah123 looks like your latest commit broke some stuff, please review the failed checks. @JoshuaKGoldberg happy to port this back to v11, created #5580