Skip to content

Conversation

@TomasHubelbauer
Copy link
Contributor

Node introduced these recently: nodejs/node#47909

I noticed the types are missing the only shorthand for all of it, describe and test. Should I add them in this PR or in a new one once this is merged?

If changing an existing definition:

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

…d todo)

Node introduced these recently: nodejs/node#47909

I noticed the types are missing the `only` shorthand for all of `it`, `describe` and `test`. Should I add them in this PR or in a new one once this is merged?
@typescript-bot
Copy link
Contributor

typescript-bot commented May 17, 2023

@TomasHubelbauer Thank you for submitting this PR!

This is a live comment which 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

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": 65518,
  "author": "TomasHubelbauer",
  "headCommitOid": "a036d0e94b0bbed763c3343a72d60ab5c6d5e8fd",
  "mergeBaseOid": "596daba1c836aebb0492a4aa68ceb37477a68732",
  "lastPushDate": "2023-05-17T14:49:20.000Z",
  "lastActivityDate": "2023-05-17T23:17:04.000Z",
  "mergeOfferDate": "2023-05-17T19:51:32.000Z",
  "mergeRequestDate": "2023-05-17T23:17:04.000Z",
  "mergeRequestUser": "TomasHubelbauer",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/test.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/test/test.ts",
          "kind": "test"
        },
        {
          "path": "types/node/ts4.8/test.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "Microsoft",
        "DefinitelyTyped",
        "jkomyno",
        "alvis",
        "r3nya",
        "btoueg",
        "smac89",
        "touffy",
        "DeividasBakanas",
        "eyqs",
        "Hannes-Magnusson-CK",
        "hoo29",
        "kjin",
        "ajafff",
        "islishude",
        "mwiktorczyk",
        "mohsen1",
        "n-e",
        "galkin",
        "parambirs",
        "eps1lon",
        "SimonSchick",
        "ThomasdenH",
        "WilcoBakker",
        "wwwy3y3",
        "samuela",
        "kuehlein",
        "bhongy",
        "chyzwar",
        "trivikr",
        "yoursunny",
        "qwelias",
        "ExE-Boss",
        "peterblazejewicz",
        "addaleax",
        "victorperin",
        "ZYSzys",
        "NodeJS",
        "LinusU",
        "wafuwafu13",
        "mcollina",
        "Semigradsky"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "jakebailey",
      "date": "2023-05-17T19:50:48.000Z",
      "isMaintainer": true
    },
    {
      "type": "approved",
      "reviewer": "Semigradsky",
      "date": "2023-05-17T16:46:05.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 1551157647,
  "ciResult": "pass"
}

@typescript-bot
Copy link
Contributor

@Semigradsky
Copy link
Contributor

@TomasHubelbauer Please update the version in index.d.ts (these shorthands were added in 20.2.0).

Also could you please add only shorthands?

@Semigradsky
Copy link
Contributor

Also please change in ts4.8 folder - version for TypeScript<4.8

These were missing before and even though they were not introduced with the `test` shorthands I was asked by the types maintainer to add them in this PR.
I think this is how it should be done.
The `todo` shorthands were added in the as of writing latest stable version of Node.
@TomasHubelbauer
Copy link
Contributor Author

TomasHubelbauer commented May 17, 2023

@Semigradsky

  • Updated version in index.d.ts to 20.2.0
  • Added the only shorthand to all of test, it and describe (note that these existed before Node 20.2.0 though)
  • Corrected SuiteFn (in describe) versus TestFn (in it and test)
  • Copied over to ts4.8 (where it uses ItFn not TestFn)

LMK if you want me to adjust anything else.

@typescript-bot typescript-bot added the The CI failed When GH Actions fails label May 17, 2023
@typescript-bot
Copy link
Contributor

@TomasHubelbauer The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

Didn't realize this was the case.
@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label May 17, 2023
Copy link
Contributor

@Semigradsky Semigradsky left a comment

Choose a reason for hiding this comment

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

👍

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label May 17, 2023
@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels May 17, 2023
@typescript-bot
Copy link
Contributor

@TomasHubelbauer: Everything looks good here. I am ready to merge this PR (at a036d0e) 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, @DefinitelyTyped, @jkomyno, @alvis, @r3nya, @btoueg, @smac89, @Touffy, @DeividasBakanas, @eyqs, @Hannes-Magnusson-CK, @hoo29, @kjin, @ajafff, @islishude, @mwiktorczyk, @mohsen1, @n-e, @galkin, @parambirs, @eps1lon, @SimonSchick, @ThomasdenH, @WilcoBakker, @wwwy3y3, @samuela, @kuehlein, @bhongy, @chyzwar, @trivikr, @yoursunny, @qwelias, @ExE-Boss, @peterblazejewicz, @addaleax, @victorperin, @ZYSzys, @nodejs, @LinusU, @wafuwafu13, @mcollina, @Semigradsky: you can do this too.)

@TomasHubelbauer
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit a0dad36 into DefinitelyTyped:master May 17, 2023
@TomasHubelbauer TomasHubelbauer deleted the node/todo-shorthands branch May 17, 2023 23:17
Desplandis pushed a commit to Desplandis/DefinitelyTyped that referenced this pull request Jul 3, 2023
…de test runner todo shorthands (skip and todo) by @TomasHubelbauer

* Add tests and types for new Node test runner todo shorthands (skip and todo)

Node introduced these recently: nodejs/node#47909

I noticed the types are missing the `only` shorthand for all of `it`, `describe` and `test`. Should I add them in this PR or in a new one once this is merged?

* Add the `only` shorthands

These were missing before and even though they were not introduced with the `test` shorthands I was asked by the types maintainer to add them in this PR.

* Add tests for the `only` shorthand

I think this is how it should be done.

* Update version in `index.d.ts`

The `todo` shorthands were added in the as of writing latest stable version of Node.

* Add the same to `ts4.8` and fix `TestFn`/`SuiteFn` type

This should be correct.

* Use MAJOR.MINOR version as is enforced in the CI

Didn't realize this was the case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Maintainer Approved 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