Skip to content

[node] test: mock.module can take a URL - #74486

Merged
typescript-bot merged 1 commit into
DefinitelyTyped:masterfrom
reillylm:fix/node-test-mock-module-url
Feb 10, 2026
Merged

typescript-bot merged 1 commit into
DefinitelyTyped:masterfrom
reillylm:fix/node-test-mock-module-url

Conversation

@reillylm

@reillylm reillylm commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: see below
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the package.json.

This behavior is since nodejs/node#54416. It is in v22 since v22.8.0 (nodejs/node#54560), v24 since v24.0.0, and v25 since v25.0.0. It's not in v22.

Relevant Nodejs docs: https://nodejs.org/docs/latest-v25.x/api/test.html#mockmodulespecifier-options

Relevant Nodejs code: https://github.com/nodejs/node/blob/ae2ffce5f3d5ac5ad153d98839d5a19a70e073b2/lib/internal/test_runner/mock/mock.js#L619-L625

Relevant Nodejs test: https://github.com/nodejs/node/blob/ae2ffce5f3d5ac5ad153d98839d5a19a70e073b2/test/parallel/test-runner-module-mocking.js#L158-L160

@typescript-bot

typescript-bot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

@reillylm Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment that I will keep updated.

1 package in this PR

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners or DT maintainers

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 74486,
  "author": "reillylm",
  "headCommitOid": "577ebf1f04b2da8f5a263a7b4727236334e7b02d",
  "mergeBaseOid": "e6b9bf3e1e9624a311ba3681710b2592e781c7d0",
  "lastPushDate": "2026-02-06T03:12:19.000Z",
  "lastActivityDate": "2026-02-10T14:35:30.000Z",
  "maintainerBlessed": "Waiting for Author to Merge (Blessed)",
  "mergeOfferDate": "2026-02-07T01:02:42.000Z",
  "mergeRequestDate": "2026-02-10T14:35:30.000Z",
  "mergeRequestUser": "reillylm",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/node-tests/test.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v22/test.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v22/test/test.ts",
          "kind": "test"
        },
        {
          "path": "types/node/v24/test.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v24/test/test.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "Microsoft",
        "jkomyno",
        "r3nya",
        "btoueg",
        "touffy",
        "mohsen1",
        "galkin",
        "eps1lon",
        "WilcoBakker",
        "chyzwar",
        "trivikr",
        "yoursunny",
        "qwelias",
        "ExE-Boss",
        "peterblazejewicz",
        "addaleax",
        "victorperin",
        "NodeJS",
        "LinusU",
        "wafuwafu13",
        "mcollina",
        "Semigradsky",
        "Renegade334",
        "anonrig"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "Renegade334",
      "date": "2026-02-06T06:01:50.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 3857702864,
  "ciResult": "pass"
}

@typescript-bot

Copy link
Copy Markdown
Contributor

🔔 @microsoft @jkomyno @r3nya @btoueg @Touffy @mohsen1 @galkin @eps1lon @WilcoBakker @chyzwar @trivikr @yoursunny @qwelias @ExE-Boss @peterblazejewicz @addaleax @victorperin @nodejs @LinusU @wafuwafu13 @mcollina @Semigradsky @Renegade334 @anonrig — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board Feb 6, 2026

@Renegade334 Renegade334 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

as of v22.8.0

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Feb 6, 2026
@sheetalkamat sheetalkamat moved this from Needs Maintainer Review to Waiting for Code Reviews (Blessed) in Pull Request Status Board Feb 6, 2026
@typescript-bot typescript-bot added the Self Merge This PR can now be self-merged by the PR author or an owner label Feb 7, 2026
@typescript-bot

Copy link
Copy Markdown
Contributor

@reillylm: Everything looks good here. I am ready to merge this PR (at 577ebf1) on your behalf whenever you think it's ready.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@microsoft, @jkomyno, @r3nya, @btoueg, @Touffy, @mohsen1, @galkin, @eps1lon, @WilcoBakker, @chyzwar, @trivikr, @yoursunny, @qwelias, @ExE-Boss, @peterblazejewicz, @addaleax, @victorperin, @nodejs, @LinusU, @wafuwafu13, @mcollina, @Semigradsky, @Renegade334, @anonrig: you can do this too.)

@typescript-bot typescript-bot moved this from Waiting for Code Reviews (Blessed) to Waiting for Author to Merge (Blessed) in Pull Request Status Board Feb 7, 2026
@reillylm

Copy link
Copy Markdown
Contributor Author

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge (Blessed) to Recently Merged in Pull Request Status Board Feb 10, 2026
@typescript-bot
typescript-bot merged commit 000926a into DefinitelyTyped:master Feb 10, 2026
15 checks passed
joanlopez pushed a commit to grafana/k6-DefinitelyTyped that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants