test_runner: add --test-skip-pattern cli option

PR-URL: https://github.com/nodejs/node/pull/52529
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
This commit is contained in:
Aviv Keller 2024-04-18 16:59:50 -04:00 committed by GitHub
parent 3790d524c1
commit e9c233cd6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 185 additions and 28 deletions

View file

@ -200,6 +200,7 @@ function parseCommandLine() {
let destinations;
let reporters;
let testNamePatterns;
let testSkipPatterns;
let testOnlyFlag;
if (isChildProcessV8) {
@ -240,6 +241,9 @@ function parseCommandLine() {
testNamePatternFlag,
(re) => convertStringToRegExp(re, '--test-name-pattern'),
) : null;
const testSkipPatternFlag = getOptionValue('--test-skip-pattern');
testSkipPatterns = testSkipPatternFlag?.length > 0 ?
ArrayPrototypeMap(testSkipPatternFlag, (re) => convertStringToRegExp(re, '--test-skip-pattern')) : null;
}
globalTestOptions = {
@ -250,6 +254,7 @@ function parseCommandLine() {
sourceMaps,
testOnlyFlag,
testNamePatterns,
testSkipPatterns,
reporters,
destinations,
};