Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
Description
Version
v20.0.0-pre
Platform
Darwin Moshes-MBP.localdomain 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000 arm64
Subsystem
test_runner
What steps will reproduce the bug?
run
const test = require('node:test'); test((t) =>{t.diagnostic('this is a diagnostic'); t.test((t) =>{t.diagnostic('this is a nested diagnostic')})}); How often does it reproduce? Is there a required condition?
always
What is the expected behavior?
when running without --flag the diagnostics are printed:
TAP version 13 # Subtest: <anonymous> # Subtest: <anonymous> ok 1 - <anonymous> --- duration_ms: 1.904541 ... # this is a nested diagnostic 1..1 ok 1 - <anonymous> --- duration_ms: 2.817666 ... # this is a diagnostic 1..1 # tests 1 # pass 1 # fail 0 # cancelled 0 # skipped 0 # todo 0 # duration_ms 5.736792 What do you see instead?
this is the result of adding a log where all the TAP parsed tokens are handled
node/lib/internal/test_runner/runner.js
Line 133 in f14fa1b
| #handleReportItem({ kind, node, nesting =0}){ |
TAPversion13VersionKeyword{ version: '13'}1 # Subtest: /Users/moshe/repos/node/a.jsSubTestPointKeyword{ name: '<anonymous>'}1SubTestPointKeyword{ name: '<anonymous>'}2TestPointKeyword{status: {fail: false,pass: true,todo: false,skip: false},id: '1',description: '<anonymous>',reason: '',time: 1.886167,diagnostics: ['duration_ms: 1.886167']}2PlanKeyword{start: '1',end: '1'}2TestPointKeyword{status: {fail: false,pass: true,todo: false,skip: false},id: '1',description: '<anonymous>',reason: '',time: 2.906042,diagnostics: ['duration_ms: 2.906042']}1PlanKeyword{start: '1',end: '1'}1Comment{ comment: 'tests 1'}1Comment{ comment: 'pass 1'}1Comment{ comment: 'fail 0'}1Comment{ comment: 'cancelled 0'}1Comment{ comment: 'skipped 0'}1Comment{ comment: 'todo 0'}1Comment{ comment: 'duration_ms 5.808208'}1ok1-/Users/moshe/repos/node/a.js---duration_ms: 86.315...1..1 # tests1 # pass1 # fail0 # cancelled0 # skipped0 # todo0 # duration_ms87.029333the diagnostics are missing
Additional information
No response
Metadata
Metadata
Assignees
Labels
test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.