test_runner: avoid running twice tests in describe#46888
test_runner: avoid running twice tests in describe#46888MoLow wants to merge 1 commit intonodejs:mainfrom
Conversation
|
Review requested:
|
d9021c1 to
e3c44e3
Compare
aduh95
left a comment
There was a problem hiding this comment.
I'm not too sure if returning undefined is the correct move (rather than a PromiseResolve()), is there some use case when it would be useful for the users to make the difference?
Other than that, I think I would word the commit as avoid running tests twice, but I'm not an English native speaker, so if the current order is correct, I'm fine with it :)
returning a |
|
That sounds less confusing an API to me than one that only sometimes returns a Promise - the latter is literally what's referred to as "zalgo". |
2c235f2 to
95d8d57
Compare
|
@nodejs/test_runner since this is a bug in main I'd like to land it, additional reviews/approvals will be appreciated |
|
|
||
| function runInParentContext(Factory) { | ||
| function runInParentContext(Factory, addShorthands = true) { | ||
| function run(name, options, fn, overrides) { |
There was a problem hiding this comment.
| function run(name, options, fn, overrides) { | |
| async function run(name, options, fn, overrides) { |
doing this instead would ensure it always returns a promise
There was a problem hiding this comment.
@ljharb change has caused invalid arguments to reject instead of throw so I will revert this
fec80e6 to
95d8d57
Compare
Commit Queue failed- Loading data for nodejs/node/pull/46888 ✔ Done loading data for nodejs/node/pull/46888 ----------------------------------- PR info ------------------------------------ Title test_runner: avoid running twice tests in describe (#46888) Author Moshe Atlow (@MoLow) Branch MoLow:fix-test-in-describe -> nodejs:main Labels author ready, needs-ci, dont-land-on-v14.x, test_runner Commits 1 - test_runner: avoid running twice tests in describe Committers 1 - Moshe Atlow PR-URL: https://github.com/nodejs/node/pull/46888 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Antoine du Hamel ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/46888 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Antoine du Hamel -------------------------------------------------------------------------------- ℹ This PR was created on Tue, 28 Feb 2023 20:30:39 GMT ✔ Approvals: 2 ✔ - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/46888#pullrequestreview-1320288015 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/46888#pullrequestreview-1322529537 ✖ Last GitHub CI failed ℹ Last Full PR CI on 2023-03-02T22:06:27Z: https://ci.nodejs.org/job/node-test-pull-request/50173/ - Querying data for job/node-test-pull-request/50173/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/4320318363 |
PR-URL: #46888 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
|
Landed in a37b72d |
PR-URL: #46888 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #46888 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #46888 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Fixes #46887
not the fix itself can be understood in the first commit, the second one just unifies the code,
wanted to make review easier so split into two commits