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

doc: add code examples to node test runner #43359

Closed
wants to merge 1 commit into from

Conversation

manekinekko
Copy link
Contributor

@manekinekko manekinekko commented Jun 9, 2022

Add a few code examples to the TestContext docs.

cc @benjamingr @fhinkel

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. test Issues and PRs related to the tests. labels Jun 9, 2022
doc/api/test.md Outdated Show resolved Hide resolved
doc/api/test.md Outdated Show resolved Hide resolved
Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

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

Thanks a bunch! cc @cjihrig

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@lpinca lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 14, 2022
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jun 14, 2022
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/43359
✔  Done loading data for nodejs/node/pull/43359
----------------------------------- PR info ------------------------------------
Title      doc: add code examples to node test runner (#43359)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     manekinekko:node-test-docs-update -> nodejs:master
Labels     doc, test
Commits    3
 - doc: add code examples to node test runner
 - Update doc/api/test.md
 - Update doc/api/test.md
Committers 2
 - Wassim Chegham 
 - GitHub 
PR-URL: https://github.com/nodejs/node/pull/43359
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: Colin Ihrig 
Reviewed-By: Akhil Marsonya 
Reviewed-By: Harshitha K P 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/43359
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: Colin Ihrig 
Reviewed-By: Akhil Marsonya 
Reviewed-By: Harshitha K P 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Thu, 09 Jun 2022 10:25:59 GMT
   ✔  Approvals: 6
   ✔  - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/43359#pullrequestreview-1001843939
   ✔  - Colin Ihrig (@cjihrig) (TSC): https://github.com/nodejs/node/pull/43359#pullrequestreview-1002140928
   ✔  - Akhil Marsonya (@marsonya): https://github.com/nodejs/node/pull/43359#pullrequestreview-1002274416
   ✔  - Harshitha K P (@HarshithaKP): https://github.com/nodejs/node/pull/43359#pullrequestreview-1002774716
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/43359#pullrequestreview-1003208538
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/43359#pullrequestreview-1003512636
   ✖  Last GitHub CI failed
   ℹ  Green GitHub CI is sufficient
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/2493221011

@benjamingr
Copy link
Member

@manekinekko can you please update info on GitHub so we can land this automatically and (possibly) squash it to one commit :)?

⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile!

@manekinekko
Copy link
Contributor Author

I just made my email public. Can you try again and let me know? Thank you ☺️

@benjamingr benjamingr added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Jun 14, 2022
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jun 14, 2022
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/43359
✔  Done loading data for nodejs/node/pull/43359
----------------------------------- PR info ------------------------------------
Title      doc: add code examples to node test runner (#43359)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     manekinekko:node-test-docs-update -> nodejs:master
Labels     doc, test, commit-queue-squash
Commits    3
 - doc: add code examples to node test runner
 - Update doc/api/test.md
 - Update doc/api/test.md
Committers 2
 - Wassim Chegham 
 - GitHub 
PR-URL: https://github.com/nodejs/node/pull/43359
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: Colin Ihrig 
Reviewed-By: Akhil Marsonya 
Reviewed-By: Harshitha K P 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/43359
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: Colin Ihrig 
Reviewed-By: Akhil Marsonya 
Reviewed-By: Harshitha K P 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Thu, 09 Jun 2022 10:25:59 GMT
   ✔  Approvals: 6
   ✔  - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/43359#pullrequestreview-1001843939
   ✔  - Colin Ihrig (@cjihrig) (TSC): https://github.com/nodejs/node/pull/43359#pullrequestreview-1002140928
   ✔  - Akhil Marsonya (@marsonya): https://github.com/nodejs/node/pull/43359#pullrequestreview-1002274416
   ✔  - Harshitha K P (@HarshithaKP): https://github.com/nodejs/node/pull/43359#pullrequestreview-1002774716
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/43359#pullrequestreview-1003208538
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/43359#pullrequestreview-1003512636
   ✖  Last GitHub CI failed
   ℹ  Green GitHub CI is sufficient
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/2495155286

@benjamingr
Copy link
Member

⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile!
@manekinekko

@manekinekko
Copy link
Contributor Author

@benjamingr Sorry about that! My email is visible on my profile page though. Am I missing something?

@Trott
Copy link
Member

Trott commented Jun 15, 2022

@benjamingr Sorry about that! My email is visible on my profile page though. Am I missing something?

The change would be something to make in the first git commit. The author for that commit is:

Wassim Chegham <[email protected]>

You'll want to amend that commit to use your email address (or not I suppose if you don't want that public, in which case I can land this manually).

@manekinekko
Copy link
Contributor Author

@Trott I've squashed my commits and my commit should have my email address. Let's see if that fixes the issue.
image

@benjamingr benjamingr added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jun 15, 2022
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jun 15, 2022
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/43359
✔  Done loading data for nodejs/node/pull/43359
----------------------------------- PR info ------------------------------------
Title      doc: add code examples to node test runner (#43359)
Author     Wassim Chegham  (@manekinekko)
Branch     manekinekko:node-test-docs-update -> nodejs:main
Labels     doc, test
Commits    1
 - doc: add code examples to node test runner
Committers 1
 - Wassim Chegham 
PR-URL: https://github.com/nodejs/node/pull/43359
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: Colin Ihrig 
Reviewed-By: Akhil Marsonya 
Reviewed-By: Harshitha K P 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
Reviewed-By: Franziska Hinkelmann 
Reviewed-By: Rich Trott 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/43359
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: Colin Ihrig 
Reviewed-By: Akhil Marsonya 
Reviewed-By: Harshitha K P 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
Reviewed-By: Franziska Hinkelmann 
Reviewed-By: Rich Trott 
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last review:
   ⚠  - doc: add code examples to node test runner
   ℹ  This PR was created on Thu, 09 Jun 2022 10:25:59 GMT
   ✔  Approvals: 8
   ✔  - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/43359#pullrequestreview-1001843939
   ✔  - Colin Ihrig (@cjihrig) (TSC): https://github.com/nodejs/node/pull/43359#pullrequestreview-1002140928
   ✔  - Akhil Marsonya (@marsonya): https://github.com/nodejs/node/pull/43359#pullrequestreview-1002274416
   ✔  - Harshitha K P (@HarshithaKP): https://github.com/nodejs/node/pull/43359#pullrequestreview-1002774716
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/43359#pullrequestreview-1003208538
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/43359#pullrequestreview-1003512636
   ✔  - Franziska Hinkelmann (@fhinkel) (TSC): https://github.com/nodejs/node/pull/43359#pullrequestreview-1006639788
   ✔  - Rich Trott (@Trott) (TSC): https://github.com/nodejs/node/pull/43359#pullrequestreview-1007529851
   ✔  Last GitHub CI successful
   ℹ  Green GitHub CI is sufficient
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/2503782670

@Trott Trott added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Jun 16, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 16, 2022
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/43359
✔  Done loading data for nodejs/node/pull/43359
----------------------------------- PR info ------------------------------------
Title      doc: add code examples to node test runner (#43359)
Author     Wassim Chegham  (@manekinekko)
Branch     manekinekko:node-test-docs-update -> nodejs:main
Labels     doc, test
Commits    1
 - doc: add code examples to node test runner
Committers 1
 - Wassim Chegham 
PR-URL: https://github.com/nodejs/node/pull/43359
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: Colin Ihrig 
Reviewed-By: Akhil Marsonya 
Reviewed-By: Harshitha K P 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
Reviewed-By: Franziska Hinkelmann 
Reviewed-By: Rich Trott 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/43359
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: Colin Ihrig 
Reviewed-By: Akhil Marsonya 
Reviewed-By: Harshitha K P 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
Reviewed-By: Franziska Hinkelmann 
Reviewed-By: Rich Trott 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Thu, 09 Jun 2022 10:25:59 GMT
   ✔  Approvals: 8
   ✔  - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/43359#pullrequestreview-1001843939
   ✔  - Colin Ihrig (@cjihrig) (TSC): https://github.com/nodejs/node/pull/43359#pullrequestreview-1002140928
   ✔  - Akhil Marsonya (@marsonya): https://github.com/nodejs/node/pull/43359#pullrequestreview-1002274416
   ✔  - Harshitha K P (@HarshithaKP): https://github.com/nodejs/node/pull/43359#pullrequestreview-1002774716
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/43359#pullrequestreview-1003208538
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/43359#pullrequestreview-1003512636
   ✔  - Franziska Hinkelmann (@fhinkel) (TSC): https://github.com/nodejs/node/pull/43359#pullrequestreview-1006639788
   ✔  - Rich Trott (@Trott) (TSC): https://github.com/nodejs/node/pull/43359#pullrequestreview-1008458724
   ✔  Last GitHub CI successful
   ℹ  Green GitHub CI is sufficient
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
   358008f473..72f9597d3e  main       -> origin/main
✔  origin/main is now up-to-date
main is out of sync with origin/main. Mismatched commits:
 - 0c7231265a tools: update lint-md-dependencies to [email protected]
 - 72f9597d3e tools: update lint-md-dependencies to [email protected]
--------------------------------------------------------------------------------
HEAD is now at 72f9597d3e tools: update lint-md-dependencies to [email protected]
   ✔  Reset to origin/main
- Downloading patch for 43359
From https://github.com/nodejs/node
 * branch                  refs/pull/43359/merge -> FETCH_HEAD
✔  Fetched commits as 72f9597d3e8f..ed16e2897c85
--------------------------------------------------------------------------------
[main 3cab79599a] doc: add code examples to node test runner
 Author: Wassim Chegham 
 Date: Thu Jun 9 12:23:40 2022 +0200
 1 file changed, 43 insertions(+)
   ✔  Patches applied
--------------------------------------------------------------------------------
--------------------------------- New Message ----------------------------------
doc: add code examples to node test runner

Co-authored-by: Antoine du Hamel [email protected]

PR-URL: #43359
Reviewed-By: Benjamin Gruenbaum [email protected]
Reviewed-By: Colin Ihrig [email protected]
Reviewed-By: Akhil Marsonya [email protected]
Reviewed-By: Harshitha K P [email protected]
Reviewed-By: Luigi Pinca [email protected]
Reviewed-By: James M Snell [email protected]
Reviewed-By: Franziska Hinkelmann [email protected]
Reviewed-By: Rich Trott [email protected]

[main b9034e7eb3] doc: add code examples to node test runner
Author: Wassim Chegham [email protected]
Date: Thu Jun 9 12:23:40 2022 +0200
1 file changed, 43 insertions(+)
✖ b9034e7eb3697444d38881970f8d27fefb7bcf40
✖ 1:0 Co-authored-by must be a trailer co-authored-by-is-trailer
✔ 0:0 skipping fixes-url fixes-url
✔ 0:0 blank line after title line-after-title
✔ 0:0 line-lengths are valid line-length
✔ 0:0 metadata is at end of message metadata-end
✔ 3:8 PR-URL is valid. pr-url
✔ 0:0 reviewers are valid reviewers
✔ 0:0 valid subsystems subsystem
✔ 0:0 Title is formatted correctly. title-format
✔ 0:0 Title is <= 50 columns. title-length

ℹ Please fix the commit message and try again.

https://github.com/nodejs/node/actions/runs/2506616458

@nodejs-github-bot nodejs-github-bot added the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Jun 16, 2022
@manekinekko
Copy link
Contributor Author

It looks like the automatic merge is still failing. @Trott maybe you can merge this manually then (if that's possible). I don't know how to fix it. Sorry about the inconvenience 😃

@lpinca
Copy link
Member

lpinca commented Jun 16, 2022

Landed in 6975dd1.

lpinca pushed a commit that referenced this pull request Jun 16, 2022
PR-URL: #43359
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Harshitha K P <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Co-authored-by: Antoine du Hamel <[email protected]>
@lpinca lpinca closed this Jun 16, 2022
@benjamingr
Copy link
Member

benjamingr commented Jun 16, 2022

@manekinekko what happened is that you merged a suggestion by @aduh95 into this PR, when you squashed it included the Co-Authored-By part which node-core-utils doesn't currently (fully) support automatically so a member (in this case Luigi) fixed the formatting and landed it.

@manekinekko
Copy link
Contributor Author

Thank you @benjamingr for the explanation. And thank you @lpinca for landing this PR 💖

targos pushed a commit that referenced this pull request Jul 12, 2022
PR-URL: #43359
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Harshitha K P <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Co-authored-by: Antoine du Hamel <[email protected]>
@targos
Copy link
Member

targos commented Jul 18, 2022

Depends on #42658

@targos targos removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. dont-land-on-v16.x labels Jul 31, 2022
targos pushed a commit that referenced this pull request Jul 31, 2022
PR-URL: #43359
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Harshitha K P <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Co-authored-by: Antoine du Hamel <[email protected]>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
PR-URL: nodejs/node#43359
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Harshitha K P <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Co-authored-by: Antoine du Hamel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.