test_runner: support 'only' tests - #42514
Conversation
This commit introduces a CLI flag and test runner functionality to support running a subset of tests that are indicated by an 'only' option passed to the test.
|
What's the use case for this? A boolean flag doesn't seem very efficient to select what tests to run 🤔 |
If you mean the 'only' functionality, it's present in just about every test framework that I can think of.
A few things to note here:
|
|
Ive never heard of that feature before this PR ^^ just tried it as I was debugging some Jest test, and sure I can see how it’s useful :) imo the DX would be improved if the default was the less performant option, with a flag to disable it for CI? Wdyt? |
I'd prefer to keep the common case faster to be honest. |
aduh95
left a comment
There was a problem hiding this comment.
LGTM. I still wonder if it would make sense to have a --test-dev-mode flag instead in case we want to add more DX features that would have impact on performance, so we don't end up with a pletora of flags to add when debugging tests.
|
Landed in 54819f0 |
This commit introduces a CLI flag and test runner functionality to support running a subset of tests that are indicated by an 'only' option passed to the test. PR-URL: nodejs#42514 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit introduces a CLI flag and test runner functionality to support running a subset of tests that are indicated by an 'only' option passed to the test. PR-URL: nodejs#42514 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit introduces a CLI flag and test runner functionality to support running a subset of tests that are indicated by an 'only' option passed to the test. PR-URL: #42514 Backport-PR-URL: #43904 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit introduces a CLI flag and test runner functionality to support running a subset of tests that are indicated by an 'only' option passed to the test. PR-URL: nodejs/node#42514 Backport-PR-URL: nodejs/node#43904 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit introduces a CLI flag and test runner functionality to support running a subset of tests that are indicated by an 'only' option passed to the test.