mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test_runner: emit test-only diagnostic warning
PR-URL: https://github.com/nodejs/node/pull/46540 Fixes: https://github.com/nodejs/node/issues/46448 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
@@ -278,6 +278,12 @@ class Test extends AsyncResource {
|
||||
};
|
||||
this.waitingOn = 0;
|
||||
this.finished = false;
|
||||
|
||||
if (!testOnlyFlag && (only || this.runOnlySubtests)) {
|
||||
const warning =
|
||||
"'only' and 'runOnly' require the --test-only command-line option.";
|
||||
this.diagnostic(warning);
|
||||
}
|
||||
}
|
||||
|
||||
hasConcurrency() {
|
||||
|
||||
@@ -475,11 +475,13 @@ ok 52 - callback async throw after done
|
||||
---
|
||||
duration_ms: *
|
||||
...
|
||||
# 'only' and 'runOnly' require the --test-only command-line option.
|
||||
# Subtest: running subtest 3
|
||||
ok 3 - running subtest 3
|
||||
---
|
||||
duration_ms: *
|
||||
...
|
||||
# 'only' and 'runOnly' require the --test-only command-line option.
|
||||
# Subtest: running subtest 4
|
||||
ok 4 - running subtest 4
|
||||
---
|
||||
@@ -490,6 +492,7 @@ ok 53 - only is set but not in only mode
|
||||
---
|
||||
duration_ms: *
|
||||
...
|
||||
# 'only' and 'runOnly' require the --test-only command-line option.
|
||||
# Subtest: custom inspect symbol fail
|
||||
not ok 54 - custom inspect symbol fail
|
||||
---
|
||||
|
||||
@@ -475,11 +475,13 @@ ok 52 - callback async throw after done
|
||||
---
|
||||
duration_ms: *
|
||||
...
|
||||
# 'only' and 'runOnly' require the --test-only command-line option.
|
||||
# Subtest: running subtest 3
|
||||
ok 3 - running subtest 3
|
||||
---
|
||||
duration_ms: *
|
||||
...
|
||||
# 'only' and 'runOnly' require the --test-only command-line option.
|
||||
# Subtest: running subtest 4
|
||||
ok 4 - running subtest 4
|
||||
---
|
||||
@@ -490,6 +492,7 @@ ok 53 - only is set but not in only mode
|
||||
---
|
||||
duration_ms: *
|
||||
...
|
||||
# 'only' and 'runOnly' require the --test-only command-line option.
|
||||
# Subtest: custom inspect symbol fail
|
||||
not ok 54 - custom inspect symbol fail
|
||||
---
|
||||
|
||||
@@ -199,9 +199,12 @@
|
||||
only is set but not in only mode
|
||||
running subtest 1 (*ms)
|
||||
running subtest 2 (*ms)
|
||||
'only' and 'runOnly' require the --test-only command-line option.
|
||||
running subtest 3 (*ms)
|
||||
'only' and 'runOnly' require the --test-only command-line option.
|
||||
running subtest 4 (*ms)
|
||||
only is set but not in only mode (*ms)
|
||||
'only' and 'runOnly' require the --test-only command-line option.
|
||||
|
||||
custom inspect symbol fail (*ms)
|
||||
customized
|
||||
|
||||
Reference in New Issue
Block a user