-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
test: use test runner in eventtarget-once-twice test #55752
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Alexander “weej” Jones <[email protected]>
…ease the linter...
await once(et, 'foo'); | ||
await once(et, 'foo'); | ||
})().then(common.mustCall()); | ||
test('should resolve `once` twice', (t, done) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simplified as an asynchronous function, right? Calling "done" in the middle might lead to a race condition that generates extraneous asynchronous activity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my original idea but @tlhunter suggested we try with just done
. Personally I'm 65/35 on doing it with async the way it currently is now. What do you both think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Now, after I updated the PR to use async (again), albeit slightly simpler)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inclined on the async way, it's much cleaner, and there's IMO less of a chance for a race condition
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55752 +/- ##
=======================================
Coverage 88.40% 88.40%
=======================================
Files 654 654
Lines 187747 187815 +68
Branches 36127 36137 +10
=======================================
+ Hits 165972 166039 +67
+ Misses 15009 15008 -1
- Partials 6766 6768 +2 |
hey @alexweej, there's a lint issue: |
|
Commit Queue failed- Loading data for nodejs/node/pull/55752 ✔ Done loading data for nodejs/node/pull/55752 ----------------------------------- PR info ------------------------------------ Title test: use test runner in eventtarget-once-twice test (#55752) Author Alexander “weej” Jones <[email protected]> (@alexweej, first-time contributor) Branch alexweej:sdghjfsjghafjhkfs -> nodejs:main Labels test, code-and-learn, needs-ci, commit-queue-squash Commits 6 - test: use test runner in eventtarget-once-twice test - Merge remote-tracking branch 'upstream/main' into sdghjfsjghafjhkfs - Add somewhat redundant `mustCall`s. Open to suggestions on how to app… - Async (again) - Tidy up imports - comma Committers 1 - Alexander “weej” Jones <[email protected]> PR-URL: https://github.com/nodejs/node/pull/55752 Reviewed-By: Pietro Marchini <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/55752 Reviewed-By: Pietro Marchini <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Wed, 06 Nov 2024 16:09:12 GMT ✔ Approvals: 2 ✔ - Pietro Marchini (@pmarchini): https://github.com/nodejs/node/pull/55752#pullrequestreview-2424149511 ✔ - Stephen Belanger (@Qard): https://github.com/nodejs/node/pull/55752#pullrequestreview-2438826213 ℹ This PR is being fast-tracked because it is from a Code and Learn event ✔ Last GitHub CI successful ℹ Last Full PR CI on 2024-11-15T15:01:35Z: https://ci.nodejs.org/job/node-test-pull-request/63555/ - Querying data for job/node-test-pull-request/63555/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ 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 ✔ origin/main is now up-to-date - Downloading patch for 55752 From https://github.com/nodejs/node * branch refs/pull/55752/merge -> FETCH_HEAD ✔ Fetched commits as def4c2870aa0..a1009cb0a71e -------------------------------------------------------------------------------- error: commit 672dbbdf104f2af6093e187f0a1bf1bfae82aeda is a merge but no -m option was given. fatal: cherry-pick failed [main cb6b4fb92f] test: use test runner in eventtarget-once-twice test Author: Alexander “weej” Jones <[email protected]> Date: Wed Nov 6 16:02:43 2024 +0000 1 file changed, 22 insertions(+), 12 deletions(-) ✘ Failed to apply patcheshttps://github.com/nodejs/node/actions/runs/11864552572 |
Signed-off-by: Alexander “weej” Jones [email protected]