| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent eb837ce commit 463361e
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -124,6 +124,10 @@ class SpecReporter extends Transform { | |||
| 124 | 124 | callback(null, this.#handleEvent({ type, data })); | |
| 125 | 125 | } | |
| 126 | 126 | _flush(callback) { | |
| 127 | + if (this.#failedTests.length === 0) { | ||
| 128 | + callback(null, ''); | ||
| 129 | + return; | ||
| 130 | + } | ||
| 127 | 131 | const results = [`\n${colors['test:fail']}${symbols['test:fail']}failing tests:${white}\n`]; | |
| 128 | 132 | for (let i = 0; i < this.#failedTests.length; i++) { | |
| 129 | 133 | ArrayPrototypePush(results, this.#formatTestReport( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,6 @@ | |||
| 1 | + // Flags: --no-warnings --test-reporter=spec | ||
| 2 | + 'use strict'; | ||
| 3 | + require('../common'); | ||
| 4 | + const { it } = require('node:test'); | ||
| 5 | + | ||
| 6 | + it('should pass', () => {}); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,9 @@ | |||
| 1 | + * should pass *(*ms)* | ||
| 2 | + *tests 1* | ||
| 3 | + *suites 0* | ||
| 4 | + *pass 1* | ||
| 5 | + *fail 0* | ||
| 6 | + *cancelled 0* | ||
| 7 | + *skipped 0* | ||
| 8 | + *todo 0* | ||
| 9 | + *duration_ms * | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments