| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,11 +78,12 @@ class SpecReporter extends Transform { | |||
| 78 | 78 | } else if (todo !== undefined) { | |
| 79 | 79 | title += ` # ${typeof todo === 'string' && todo.length ? todo : 'TODO'}`; | |
| 80 | 80 | } | |
| 81 | + const error = this.#formatError(data.details?.error, indent); | ||
| 81 | 82 | if (hasChildren) { | |
| 82 | 83 | // If this test has had children - it was already reported, so slightly modify the output | |
| 83 | - return `${prefix}${indent}${color}${symbols['arrow:right']}${white}${title}\n`; | ||
| 84 | + const err = data.details?.error?.failureType === 'subtestsFailed' ? '' : error; | ||
| 85 | + return `${prefix}${indent}${color}${symbols['arrow:right']}${white}${title}\n${err}`; | ||
| 84 | 86 | } | |
| 85 | - const error = this.#formatError(data.details?.error, indent); | ||
| 86 | 87 | if (skip !== undefined) { | |
| 87 | 88 | color = gray; | |
| 88 | 89 | symbol = symbols['hyphen:minus']; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,11 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + require('../../../common'); | ||
| 3 | + const fixtures = require('../../../common/fixtures'); | ||
| 4 | + const spawn = require('node:child_process').spawn; | ||
| 5 | + | ||
| 6 | + const child = spawn(process.execPath, | ||
| 7 | + ['--no-warnings', '--test-reporter', 'spec', fixtures.path('test-runner/output/hooks.js')], | ||
| 8 | + { stdio: 'pipe' }); | ||
| 9 | + // eslint-disable-next-line no-control-regex | ||
| 10 | + child.stdout.on('data', (d) => process.stdout.write(d.toString().replace(/[^\x00-\x7F]/g, '').replace(/\u001b\[\d+m/g, ''))); | ||
| 11 | + child.stderr.pipe(process.stderr); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments