[node:test] Update types by shockerqt · Pull Request #65871 · DefinitelyTyped/DefinitelyTyped · GitHub
Skip to content

[node:test] Update types#65871

Merged
typescript-bot merged 2 commits into
DefinitelyTyped:masterfrom
shockerqt:master
Jul 7, 2023
Merged

[node:test] Update types#65871
typescript-bot merged 2 commits into
DefinitelyTyped:masterfrom
shockerqt:master

Conversation

@shockerqt

Copy link
Copy Markdown
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

typescript-bot commented Jun 25, 2023

Copy link
Copy Markdown
Contributor

@typescript-bot

Copy link
Copy Markdown
Contributor

@SimonSchick SimonSchick 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.

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

Comment thread types/node/test.d.ts
Comment thread types/node/test.d.ts
Comment thread types/node/test.d.ts
@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Jun 25, 2023
@typescript-bot

Copy link
Copy Markdown
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
@shockerqt

Copy link
Copy Markdown
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
Copy Markdown
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?

@Semigradsky

Semigradsky commented Jun 26, 2023

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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

Semigradsky commented Jul 5, 2023

Copy link
Copy Markdown
Contributor

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

@typescript-bot

typescript-bot commented Jul 7, 2023

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

I removed the last commit

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Jul 7, 2023

@peterblazejewicz peterblazejewicz left a comment

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@typescript-bot typescript-bot merged commit 77f54d7 into DefinitelyTyped:master Jul 7, 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.

6 participants