Skip to content

Conversation

@GeoffreyBooth
Copy link
Member

This PR refactors test/es-module/test-esm-loader-mock.mjs to use the new register and initialize APIs instead of globalPreload and setImportMetaCallback. I tried to preserve as much of the previous test as possible; all of the assertions from the earlier version are unchanged. This test passes both here, on main, and within #49144.

The largest addition to test-esm-loader-mock.mjs was code that just moved there from within the insideAppContext function in mock-loader.mjs.

@nodejs/loaders

@GeoffreyBoothGeoffreyBooth added test Issues and PRs related to the tests. esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders labels Sep 3, 2023
@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Sep 3, 2023
@nodejs-github-bot
Copy link
Collaborator

@GeoffreyBoothGeoffreyBooth removed the needs-ci PRs that need a full CI run. label Sep 3, 2023
Copy link
Member

@JakobJingleheimerJakobJingleheimer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌 wow! we should use this before & after as a poster-child for register & initialize

@aduh95aduh95 added the needs-ci PRs that need a full CI run. label Sep 3, 2023
@aduh95aduh95force-pushed the refactor-mocking-test branch from bcb1837 to d1bedb7CompareSeptember 3, 2023 18:48
@GeoffreyBoothGeoffreyBooth removed the needs-ci PRs that need a full CI run. label Sep 4, 2023
@GeoffreyBoothGeoffreyBooth added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 4, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 4, 2023
@nodejs-github-bot
Copy link
Collaborator

@aduh95aduh95 added the needs-ci PRs that need a full CI run. label Sep 4, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@GeoffreyBoothGeoffreyBooth added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Sep 5, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 5, 2023
@nodejs-github-botnodejs-github-bot merged commit 6a5394e into nodejs:mainSep 5, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 6a5394e

@GeoffreyBoothGeoffreyBooth deleted the refactor-mocking-test branch September 5, 2023 01:14
ruyadorno pushed a commit that referenced this pull request Sep 28, 2023
PR-URL: #49465 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
This was referenced Sep 28, 2023
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
PR-URL: nodejs#49465 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Nov 11, 2023
PR-URL: nodejs#49465 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
targos pushed a commit that referenced this pull request Nov 23, 2023
PR-URL: #49465 Backport-PR-URL: #50669 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
@targostargos mentioned this pull request Nov 28, 2023
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#49465 Backport-PR-URL: nodejs/node#50669 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#49465 Backport-PR-URL: nodejs/node#50669 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.esmIssues and PRs related to the ECMAScript Modules implementation.loadersIssues and PRs related to ES module loadersneeds-ciPRs that need a full CI run.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@GeoffreyBooth@nodejs-github-bot@JakobJingleheimer@aduh95@targos