-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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_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. |
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.
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 <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
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 <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
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 <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
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 <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Notable changes: crypto: * (SEMVER-MINOR) remove Node.js-specific webcrypto extensions (Filip Skokan) #43310 * (SEMVER-MINOR) add CFRG curves to Web Crypto API (Filip Skokan) #42507 * (SEMVER-MINOR) make authTagLength optional for CC20P1305 (Tobias Nießen) #42427 * (SEMVER-MINOR) align webcrypto RSA key import/export with other implementations (Filip Skokan) #42816 deps: * update undici to 5.4.0 (Node.js GitHub Bot) #43262 * update undici to 5.3.0 (Node.js GitHub Bot) #43197 dns: * (SEMVER-MINOR) export error code constants from `dns/promises` (Feng Yu) #43176 doc: * add F3n67u to collaborators (Feng Yu) #43953 * deprecate coercion to integer in process.exit (Daeyeon Jeong) #43738 * (SEMVER-MINOR) deprecate diagnostics_channel object subscribe method (Stephen Belanger) #42714 * add LiviaMedeiros to collaborators (LiviaMedeiros) #43039 * add @kuriyosh to collaborators (Yoshiki Kurihara) #42824 * add RafaelGSS to collaborators (RafaelGSS) #42718 * add @meixg to collaborators (Xuguang Mei) #42576 errors: * (SEMVER-MINOR) add support for cause in aborterror (James M Snell) #41008 esm: * (SEMVER-MINOR) add chaining to loaders (Jacob Smith) #42623 events: * (SEMVER-MINOR) expose CustomEvent on global with CLI flag (Daeyeon Jeong) #43885 * (SEMVER-MINOR) add `CustomEvent` (Daeyeon Jeong) #43514 * (SEMVER-MINOR) propagate abortsignal reason in new AbortError ctor in events (James M Snell) #41008 fs: * (SEMVER-MINOR) propagate abortsignal reason in new AbortSignal constructors (James M Snell) #41008 * (SEMVER-MINOR) make params in writing methods optional (LiviaMedeiros) #42601 * (SEMVER-MINOR) add `read(buffer[, options])` versions (LiviaMedeiros) #42768 http: * (SEMVER-MINOR) add drop request event for http server (theanarkh) #43806 * (SEMVER-MINOR) add diagnostics channel for http client (theanarkh) #43580 * (SEMVER-MINOR) add perf_hooks detail for http request and client (theanarkh) #43361 * (SEMVER-MINOR) add uniqueHeaders option to request and createServer (Paolo Insogna) #41397 http2: * (SEMVER-MINOR) propagate abortsignal reason in new AbortError constructor (James M Snell) #41008 * (SEMVER-MINOR) compat support for array headers (OneNail) #42901 lib: * (SEMVER-MINOR) propagate abortsignal reason in new AbortError constructor in blob (James M Snell) #41008 * (SEMVER-MINOR) add abortSignal.throwIfAborted() (James M Snell) #40951 * (SEMVER-MINOR) improved diagnostics_channel subscribe/unsubscribe (Stephen Belanger) #42714 module: * (SEMVER-MINOR) add isBuiltIn method (hemanth.hm) #43396 module,repl: * (SEMVER-MINOR) support 'node:'-only core modules (Colin Ihrig) #42325 net: * (SEMVER-MINOR) add drop event for net server (theanarkh) #43582 * (SEMVER-MINOR) add ability to reset a tcp socket (pupilTong) #43112 node-api: * (SEMVER-MINOR) emit uncaught-exception on unhandled tsfn callbacks (Chengzhong Wu) #36510 perf_hooks: * (SEMVER-MINOR) add PerformanceResourceTiming (RafaelGSS) #42725 report: * (SEMVER-MINOR) add more heap infos in process report (theanarkh) #43116 src: * (SEMVER-MINOR) add --openssl-legacy-provider option (Daniel Bevenius) #40478 * (SEMVER-MINOR) define fs.constants.S_IWUSR & S_IRUSR for Win (Liviu Ionescu) #42757 src,doc,test: * (SEMVER-MAJOR) add --openssl-shared-config option (Daniel Bevenius) #43124 stream: * (SEMVER-MINOR) use cause options in AbortError constructors (James M Snell) #41008 * (SEMVER-MINOR) add iterator helper find (Nitzan Uziely) #41849 * (SEMVER-MINOR) add writableAborted (Robert Nagy) #40802 test: * (SEMVER-MINOR) add initial test module (Colin Ihrig) #42325 test_runner: * (SEMVER-MINOR) expose `describe` and `it` (Moshe Atlow) #43420 * (SEMVER-MINOR) add initial CLI runner (Colin Ihrig) #42658 * (SEMVER-MINOR) support 'only' tests (Colin Ihrig) #42514 timers: * (SEMVER-MINOR) propagate signal.reason in awaitable timers (James M Snell) #41008 util: * (SEMVER-MINOR) add tokens to parseArgs (John Gee) #43459 * (SEMVER-MINOR) add parseArgs module (Benjamin Coe) #42675 v8: * (SEMVER-MINOR) add v8.startupSnapshot utils (Joyee Cheung) #43329 * (SEMVER-MINOR) export more fields in getHeapStatistics (theanarkh) #42784 worker: * (SEMVER-MINOR) add hasRef() to MessagePort (Darshan Sen) #42849 PR-URL: TODO
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 <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
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.