test_runner: match minimum file column to 'all files' · nodejs/node@7416a7f · GitHub
Skip to content

Commit 7416a7f

Browse files
islandryuRafaelGSS
authored andcommitted
test_runner: match minimum file column to 'all files'
PR-URL: #57848 Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
1 parent 77dee41 commit 7416a7f

4 files changed

Lines changed: 42 additions & 3 deletions

File tree

lib/internal/test_runner/utils.js

Lines changed: 1 addition & 1 deletion
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Flags: --experimental-test-coverage
2+
// here we can't import common module as the coverage will be different based on the system
3+
// Unused imports are here in order to populate the coverage report
4+
// eslint-disable-next-line no-unused-vars
5+
import * as a from '../coverage-snap/a.js';
6+
7+
import { test } from 'node:test';
8+
9+
test(`Coverage Print Short Filename`);
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
TAP version 13
2+
# Subtest: Coverage Print Short Filename
3+
ok 1 - Coverage Print Short Filename
4+
---
5+
duration_ms: *
6+
type: 'test'
7+
...
8+
1..1
9+
# tests 1
10+
# suites 0
11+
# pass 1
12+
# fail 0
13+
# cancelled 0
14+
# skipped 0
15+
# todo 0
16+
# duration_ms *
17+
# start of coverage report
18+
# ---------------------------------------------------------------------------------------
19+
# file | line % | branch % | funcs % | uncovered lines
20+
# ---------------------------------------------------------------------------------------
21+
# a.js | 55.77 | 100.00 | 0.00 | 5-7 9-11 13-15 17-19 29-30 40-42 45-47 50-52
22+
# ---------------------------------------------------------------------------------------
23+
# all files | 55.77 | 100.00 | 0.00 |
24+
# ---------------------------------------------------------------------------------------
25+
# end of coverage report

test/parallel/test-runner-output.mjs

Lines changed: 7 additions & 2 deletions

0 commit comments

Comments
 (0)