| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ba07067 commit eb7e18f
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1000,12 +1000,13 @@ flags for the test runner to use a specific reporter. | |||
| 1000 | 1000 | ||
| 1001 | 1001 | The following built-reporters are supported: | |
| 1002 | 1002 | ||
| 1003 | + * `spec` | ||
| 1004 | + The `spec` reporter outputs the test results in a human-readable format. This | ||
| 1005 | + is the default reporter. | ||
| 1006 | + | ||
| 1003 | 1007 | * `tap` | |
| 1004 | 1008 | The `tap` reporter outputs the test results in the [TAP][] format. | |
| 1005 | 1009 | ||
| 1006 | - * `spec` | ||
| 1007 | - The `spec` reporter outputs the test results in a human-readable format. | ||
| 1008 | - | ||
| 1009 | 1010 | * `dot` | |
| 1010 | 1011 | The `dot` reporter outputs the test results in a compact format, | |
| 1011 | 1012 | where each passing test is represented by a `.`, | |
@@ -1018,9 +1019,6 @@ The following built-reporters are supported: | |||
| 1018 | 1019 | The `lcov` reporter outputs test coverage when used with the | |
| 1019 | 1020 | [`--experimental-test-coverage`][] flag. | |
| 1020 | 1021 | ||
| 1021 | - When `stdout` is a [TTY][], the `spec` reporter is used by default. | ||
| 1022 | - Otherwise, the `tap` reporter is used by default. | ||
| 1023 | - | ||
| 1024 | 1022 | The exact output of these reporters is subject to change between versions of | |
| 1025 | 1023 | Node.js, and should not be relied on programmatically. If programmatic access | |
| 1026 | 1024 | to the test runner's output is required, use the events emitted by the | |
@@ -3505,7 +3503,6 @@ added: | |||
| 3505 | 3503 | Can be used to abort test subtasks when the test has been aborted. | |
| 3506 | 3504 | ||
| 3507 | 3505 | [TAP]: https://testanything.org/ | |
| 3508 | - [TTY]: tty.md | ||
| 3509 | 3506 | [`--experimental-test-coverage`]: cli.md#--experimental-test-coverage | |
| 3510 | 3507 | [`--experimental-test-snapshots`]: cli.md#--experimental-test-snapshots | |
| 3511 | 3508 | [`--import`]: cli.md#--importmodule | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -119,7 +119,7 @@ const kBuiltinReporters = new SafeMap([ | |||
| 119 | 119 | ['lcov', 'internal/test_runner/reporter/lcov'], | |
| 120 | 120 | ]); | |
| 121 | 121 | ||
| 122 | - const kDefaultReporter = process.stdout.isTTY ? 'spec' : 'tap'; | ||
| 122 | + const kDefaultReporter = 'spec'; | ||
| 123 | 123 | const kDefaultDestination = 'stdout'; | |
| 124 | 124 | ||
| 125 | 125 | function tryBuiltinReporter(name) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,10 +16,10 @@ describe('node:test reporters', { concurrency: true }, () => { | |||
| 16 | 16 | it('should default to outputing TAP to stdout', async () => { | |
| 17 | 17 | const child = spawnSync(process.execPath, ['--test', testFile]); | |
| 18 | 18 | assert.strictEqual(child.stderr.toString(), ''); | |
| 19 | - assert.match(child.stdout.toString(), /TAP version 13/); | ||
| 20 | - assert.match(child.stdout.toString(), /ok 1 - ok/); | ||
| 21 | - assert.match(child.stdout.toString(), /not ok 2 - failing/); | ||
| 22 | - assert.match(child.stdout.toString(), /ok 2 - top level/); | ||
| 19 | + assert.match(child.stdout.toString(), /✖ failing tests:/); | ||
| 20 | + assert.match(child.stdout.toString(), /✔ ok/); | ||
| 21 | + assert.match(child.stdout.toString(), /✖ failing/); | ||
| 22 | + assert.match(child.stdout.toString(), /✔ top level/); | ||
| 23 | 23 | }); | |
| 24 | 24 | ||
| 25 | 25 | it('should default destination to stdout when passing a single reporter', async () => { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments