Repository navigation
test: use registerHooks() over module.register() - #67074
Open
GeoffreyBooth wants to merge 1 commit into
Open
GeoffreyBooth wants to merge 1 commit into
GeoffreyBooth wants to merge 1 commit into
Conversation
Collaborator
|
Review requested:
|
Port the tests that registered async module customization hooks, via `--loader`, `--experimental-loader` or `module.register()`, only as a means of exercising other features to use `module.registerHooks()` instead. This keeps the coverage for those features independent of the async module customization hooks, which are being removed. Tests that exist only to exercise the async module customization hooks themselves are left as they are. Assisted-by: Claude Signed-off-by: Geoffrey Booth <webadmin@geoffreybooth.com>
GeoffreyBooth
force-pushed
the
test-use-register-hooks
branch
from
October 28, 2026 04:47
2df3dc5 to
75ea128
Compare
GeoffreyBooth
marked this pull request as ready for review
October 28, 2026 04:49
Collaborator
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67074 +/- ##
==========================================
+ Coverage 90.65% 90.66% +0.01%
==========================================
Files 797 797
Lines 278482 278482
Branches 53559 53561 +2
==========================================
+ Hits 252445 252497 +52
+ Misses 16393 16354 -39
+ Partials 9644 9631 -13 🚀 New features to boost your workflow:
|
marco-ippolito
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This ports the tests that register async module customization hooks, via
--loader,--experimental-loaderormodule.register(), only as a means of exercising some other feature to usemodule.registerHooks()instead. It covers:import.meta.resolve()module.findPackageJSON()called from within a resolve hookrequire(esm)hooks graphShadowRealmThe coverage for these features no longer depends on the async module customization hooks (
module.register(), DEP0205), so those can be removed separately. Tests that exist only to exercise the async hooks themselves are left unchanged, and will be removed along with them.Fixtures that only the ported tests used are deleted.
Refs: #62395
Refs: #62401