Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[node:test] Update types #65871

Merged
merged 2 commits into from
Jul 7, 2023
Merged

Conversation

shockerqt
Copy link
Contributor

  • test, describe and it return Promise<void>
  • The callback for the 3 functions can by sync or async
  • describe callback takes SuiteContext as its only argument
  • Added SuiteContext class definition

Please fill in this template.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <<url here>>

@typescript-bot
Copy link
Contributor

typescript-bot commented Jun 25, 2023

@shockerqt 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 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": 65871,
  "author": "shockerqt",
  "headCommitOid": "8eee8abd49405a0a2122b8837eb38909c5ffbbe7",
  "mergeBaseOid": "1e1904e2588afe22d759094c21b90eac9caec018",
  "lastPushDate": "2023-06-25T20:37:58.000Z",
  "lastActivityDate": "2023-07-07T22:34:47.000Z",
  "mergeOfferDate": "2023-07-07T20:53:06.000Z",
  "mergeRequestDate": "2023-07-07T22:34:47.000Z",
  "mergeRequestUser": "shockerqt",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/test.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/test/test.ts",
          "kind": "test"
        }
      ],
      "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": "peterblazejewicz",
      "date": "2023-07-07T20:52:20.000Z",
      "isMaintainer": true
    },
    {
      "type": "approved",
      "reviewer": "Semigradsky",
      "date": "2023-07-07T07:34:01.000Z",
      "isMaintainer": false
    },
    {
      "type": "stale",
      "reviewer": "SimonSchick",
      "date": "2023-06-25T23:39:23.000Z",
      "abbrOid": "446d9a8"
    }
  ],
  "mainBotCommentID": 1606255777,
  "ciResult": "pass"
}

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Jun 25, 2023
Copy link
Contributor

@SimonSchick SimonSchick left a comment

Choose a reason for hiding this comment

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

Some of those type changes appear to be incorrect based on local testing, please test individual variants before continuing.

types/node/test.d.ts Show resolved Hide resolved
types/node/test.d.ts Show resolved Hide resolved
types/node/test.d.ts Show resolved Hide resolved
@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Jun 25, 2023
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Needs Author Action in New Pull Request Status Board Jun 25, 2023
@typescript-bot
Copy link
Contributor

@shockerqt 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!

@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label Jun 26, 2023
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Jun 26, 2023
@shockerqt
Copy link
Contributor Author

Some of those type changes appear to be incorrect based on local testing, please test individual variants before continuing.

Right! I was expecting test({ todo: true }) and todo() to return the same, since the first returns Promise<void>.

@typescript-bot
Copy link
Contributor

@SimonSchick Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Jun 26, 2023
@Semigradsky
Copy link
Contributor

Semigradsky commented Jun 26, 2023

Some of those type changes appear to be incorrect based on local testing, please test individual variants before continuing.

Right! I was expecting test({ todo: true }) and todo() to return the same, since the first returns Promise<void>.

I expect the same, it can be a bug in Node.js, would be nice to open an issue in https://github.com/nodejs/node

UPD: I have created nodejs/node#48557

@RyanCavanaugh
Copy link
Member

What's the status here? The .d.ts and node were both wrong, or the .d.ts was right and node was wrong?

@shockerqt
Copy link
Contributor Author

What's the status here? The .d.ts and node were both wrong, or the .d.ts was right and node was wrong?

Both are wrong, the last commit I pushed should be the correct .d.ts in the current node version.
And if this PR is accepted my second commit should be the correct.

I think we should fix the types for the current state of node for now

@Semigradsky
Copy link
Contributor

Semigradsky commented Jul 5, 2023

@shockerqt return type was fixed in v20.4.0. Please remove the last commit and rebase from master

@typescript-bot
Copy link
Contributor

typescript-bot commented Jul 7, 2023

@typescript-bot typescript-bot added the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label Jul 7, 2023
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Jul 7, 2023
@shockerqt
Copy link
Contributor Author

I removed the last commit

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Jul 7, 2023
@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Jul 7, 2023
Copy link
Member

@peterblazejewicz peterblazejewicz left a comment

Choose a reason for hiding this comment

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

LGTM!
@shockerqt thanks!

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner and removed Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. labels Jul 7, 2023
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in New Pull Request Status Board Jul 7, 2023
@typescript-bot
Copy link
Contributor

@shockerqt: Everything looks good here. I am ready to merge this PR (at 8eee8ab) 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.)

@shockerqt
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Jul 7, 2023
@typescript-bot typescript-bot merged commit 77f54d7 into DefinitelyTyped:master Jul 7, 2023
2 checks passed
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Jul 8, 2023
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.

None yet

6 participants