Skip to content

test: update tap reporter version to 14

Rodrigo Muino Tomonari requested to merge github/fork/anonrig/fix/tap-v14 into main

Fixes https://github.com/nodejs/node/issues/44040 according to TAP specification available on http://testanything.org/tap-version-14-specification.html

Example test:

const test = require('node:test');
const assert = require('node:assert');

test('top-level test 1', async (t) => {
  await t.test('level 1.1', () => {});
});

test('top-level test 2', () => {});

Produced output:

TAP version 14
# Subtest: top-level test 1
    ok 1 - level 1.1
      ---
      duration_ms: 0.001925209
      ...
    1..1
ok 1 - top-level test 1
  ---
  duration_ms: 0.002924375
  ...
ok 2 - top-level test 2
  ---
  duration_ms: 0.000044334
  ...
1..2
# tests 2
# pass 2
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 0.031293292

Merge request reports

Loading