-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test_runner: emit test-only diagnostic warning
- Loading branch information
1 parent
8e6e215
commit 3ee8044
Showing
6 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
require('../common'); | ||
const { test } = require('node:test'); | ||
|
||
test('only = true without --test-only flag', { only: true }, () => {}); | ||
|
||
test('subtest only = true without --test-only flag', (t) => { | ||
t.test('this subtest is run', { only: true }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
TAP version 13 | ||
# Subtest: only = true without --test-only flag | ||
ok 1 - only = true without --test-only flag | ||
--- | ||
duration_ms: * | ||
... | ||
# 'only' does not work when node is started without the --test-only command-line option | ||
# Subtest: subtest only = true without --test-only flag | ||
# Subtest: this subtest is run | ||
ok 1 - this subtest is run | ||
--- | ||
duration_ms: * | ||
... | ||
# 'only' does not work when node is started without the --test-only command-line option | ||
1..1 | ||
ok 2 - subtest only = true without --test-only flag | ||
--- | ||
duration_ms: * | ||
... | ||
1..2 | ||
# tests 2 | ||
# pass 2 | ||
# fail 0 | ||
# cancelled 0 | ||
# skipped 0 | ||
# todo 0 | ||
# duration_ms * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters