GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test_runner: hide failing tests title when all tests pass · nodejs/node@463361e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/test_runner/reporter
    • spec.js
  • test/message
    • test_runner_spec_reporter_successful.js
    • test_runner_spec_reporter_successful.out
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/test_runner/reporter/spec.js‎

Copy file name to clipboardExpand all lines: lib/internal/test_runner/reporter/spec.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ class SpecReporter extends Transform {
124124
callback(null, this.#handleEvent({ type, data }));
125125
}
126126
_flush(callback) {
127+
if (this.#failedTests.length === 0) {
128+
callback(null, '');
129+
return;
130+
}
127131
const results = [`\n${colors['test:fail']}${symbols['test:fail']}failing tests:${white}\n`];
128132
for (let i = 0; i < this.#failedTests.length; i++) {
129133
ArrayPrototypePush(results, this.#formatTestReport(
Collapse file

‎test/message/test_runner_spec_reporter_successful.js‎

Copy file name to clipboard
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff 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', () => {});
Collapse file

‎test/message/test_runner_spec_reporter_successful.out‎

Copy file name to clipboard
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff 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 *

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.