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

test: use test runner in eventtarget-once-twice test #55752

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alexweej
Copy link

@alexweej alexweej commented Nov 6, 2024

Signed-off-by: Alexander “weej” Jones [email protected]

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Nov 6, 2024
et.dispatchEvent(new Event('foo'));
})();

});
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
});
});

Copy link
Author

Choose a reason for hiding this comment

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

done!

@pmarchini pmarchini added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Nov 6, 2024
await once(et, 'foo');
await once(et, 'foo');
})().then(common.mustCall());
test('should resolve `once` twice', (t, done) => {
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants