esm: misc test refactors#46631
Conversation
5a83017 to
260b2e4
Compare
There are no changes to |
Yes there are, see https://github.com/nodejs/node/pull/46631/files#diff-fc0306c592a1d4956d08f363252348f6c94a3408ba564068e94d121c1f648755. (maybe your GitHub UI is configured to hide this kind of changes?) |
Ok my bad, I looked at the tree on the left which only shows the destination folders. |
|
@GeoffreyBooth |
- add test specific to the event loop - move parallel tests into es-module folder - refactor fixture to add braces for if blocks - use 'os' instead of 'fs' as placeholder - spelling
260b2e4 to
3042822
Compare
Done, along with all your other notes. Can I delete |
3042822 to
e54cd4e
Compare
I disagree, those are testing different things.
I'm still very much -1 on that. |
So what are you suggesting? We keep both files? We delete the spawn promisified version? |
Both options sound good to me. |
Commit Queue failed- Loading data for nodejs/node/pull/46631 ✔ Done loading data for nodejs/node/pull/46631 ----------------------------------- PR info ------------------------------------ Title esm: misc test refactors (#46631) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch GeoffreyBooth:refactor-loaders-tests -> nodejs:main Labels test, esm, author ready, loaders, commit-queue-squash Commits 3 - esm: misc test refactors - code review notes - Reorder assertions Committers 1 - Geoffrey Booth PR-URL: https://github.com/nodejs/node/pull/46631 Reviewed-By: Antoine du Hamel ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/46631 Reviewed-By: Antoine du Hamel -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 13 Feb 2023 00:33:52 GMT ✔ Approvals: 1 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/46631#pullrequestreview-1299954715 ✖ This PR needs to wait 53 more hours to land (or 0 hours if there is one more approval) ✔ Last GitHub CI successful ℹ Last Full PR CI on 2023-02-17T18:24:53Z: https://ci.nodejs.org/job/node-test-pull-request/49647/ - Querying data for job/node-test-pull-request/49647/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/4206855041 |
|
Landed in 9e840de |
- add test specific to the event loop - move parallel tests into es-module folder - refactor fixture to add braces for if blocks - use 'os' instead of 'fs' as placeholder - spelling PR-URL: #46631 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
- add test specific to the event loop - move parallel tests into es-module folder - refactor fixture to add braces for if blocks - use 'os' instead of 'fs' as placeholder - spelling PR-URL: #46631 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
- add test specific to the event loop - move parallel tests into es-module folder - refactor fixture to add braces for if blocks - use 'os' instead of 'fs' as placeholder - spelling PR-URL: #46631 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This PR contains miscellaneous test refactors that were done as part of #44710 but can live on their own. Specifically:
parallel/tests intoes-module/hooks-custom.mjsfixture to put theresolvehook first and add braces forifblocksosinstead offsas a dummy placeholder, since other loaders overridefsas part of their testsThis PR also adds
test/es-module/test-esm-loader-spawn-promisified.mjs, which is a rewrite oftest-esm-loader.mjsto use the test runner andspawnPromisified. Personally I like this version better, but if people prefertest-esm-loader.mjsI can delete the new file; I don’t think we should keep both. The new testtest-esm-loader-event-loop.mjscovers a scenario that the oldtest-esm-loader.mjswas inadvertently testing, of many rejected promises in the same file loaded through a custom loader.