Skip to content

[node] add name and fn to TestOptions - #75360

Draft
boneskull wants to merge 1 commit into
DefinitelyTyped:masterfrom
boneskull:boneskull/node-testoptions
Draft

[node] add name and fn to TestOptions#75360
boneskull wants to merge 1 commit into
DefinitelyTyped:masterfrom
boneskull:boneskull/node-testoptions

Conversation

@boneskull

@boneskull boneskull commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This formalizes fn and name as valid properties for TestOptions.

These were added to the documentation in commit nodejs/node@63fbd59e64 and it can be seen in the documentation.

Ref: nodejs/node#64946


Please fill in this template.

Note

Running pnpm test node fails:

Error:
/Users/boneskull/projects/definitelytyped/definitelytyped/types/node/ts5.6/index.d.ts
 29:21  error  TypeScript@5.1 tsconfig.dom.json, 5.1 tsconfig.non-dom.json, 5.1 tsconfig.webworker.json compile error:
Cannot find lib definition for 'esnext.disposable'  @definitelytyped/expect

and an "Incorrect .npmignore" error.

I don't think this is related to my changes, but may have something to do with my working copy state? FWIW, I've never been able to get DT's tests running properly.

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: https://beta.docs.nodejs.org/test.html#testname-options-fn
  • 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.

@typescript-automation

typescript-automation Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@boneskull Thank you for submitting this PR!

This is a live comment that I will keep updated.

1 package in this PR

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

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 a DT maintainer

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 75360,
  "author": "boneskull",
  "headCommitOid": "67df2a79a86fca6b426a8ae81569eef5e1e9c0d3",
  "mergeBaseOid": "c0c09fe434c186f9911b6dbf5054923685628d81",
  "lastPushDate": "2026-08-07T23:54:36.000Z",
  "lastActivityDate": "2026-08-08T00:07:37.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "tooManyCommits": false,
  "tooManyReviews": 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"
        }
      ],
      "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": "changereq",
      "reviewer": "Renegade334",
      "date": "2026-08-07T23:57:51.000Z"
    }
  ],
  "mainBotCommentID": 5223323739,
  "ciResult": "pass"
}

@typescript-automation

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-automation typescript-automation Bot moved this to Waiting for Code Reviews in Pull Request Status Board Aug 7, 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.

@types/node packages are versioned to the equivalent engine version and there is no staged releasing on DT. New API features can only be added in consolidated version update PRs, but we can add this commit to the corresponding @types/node update.

@typescript-automation typescript-automation Bot added the Revision needed This PR needs code changes before it can be merged. label Aug 7, 2026
@typescript-automation typescript-automation Bot moved this from Waiting for Code Reviews to Needs Author Action in Pull Request Status Board Aug 7, 2026
@typescript-automation

Copy link
Copy Markdown
Contributor

@boneskull One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

@boneskull

Copy link
Copy Markdown
Contributor Author

@Renegade334

@types/node packages are versioned to the equivalent engine version and there is no staged releasing on DT. New API features can only be added in consolidated version update PRs, but we can add this commit to the corresponding @types/node update.

Does this require action on my end?

@Renegade334

Renegade334 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Just a waiting game, unfortunately.

(You may wish to put this in draft until then, otherwise the DT tooling will periodically shout at you...)

This formalizes `fn` and `name` as valid properties for `TestOptions`.

These were added to the documentation in commit nodejs/node@63fbd59e64 and it can be seen [in the documentation](https://beta.docs.nodejs.org/test.html#testname-options-fn).
@boneskull
boneskull force-pushed the boneskull/node-testoptions branch from 67df2a7 to 66d9544 Compare August 8, 2026 00:08
@boneskull
boneskull marked this pull request as draft August 8, 2026 00:08
@boneskull

Copy link
Copy Markdown
Contributor Author

@Renegade334 Put it in draft status. I suppose someone will ping me if I need to do something later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Revision needed This PR needs code changes before it can be merged.

Projects

Status: Needs Author Action

Development

Successfully merging this pull request may close these issues.

2 participants