Skip to content

test: fix tap escaping with and without --test

Rodrigo Muino Tomonari requested to merge github/fork/pulkit-30/fix-45836 into main

fix: #45836 (closed)

code

const test = require('node:test');
test('escaped description \\ # \\#\\ \n \t \f \v \b \r');
  • tap escaping without --test
TAP version 13
# Subtest: escaped description \\ \# \\\#\\ \\n \\t \\f \\v \\b \\r
ok 1 - escaped description \\ \# \\\#\\ \\n \\t \\f \\v \\b \\r
  ---
  duration_ms: 3.569875
  ...
1..1
# tests 1
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 6.989541
  • tap escaping with --test
TAP version 13
# Subtest: /Users/pulkitgupta/Desktop/node/test.js
    # Subtest: escaped description \\ \# \\\#\\ \\n \\t \\f \\v \\b \\r
    ok 1 - escaped description \\ \# \\\#\\ \\n \\t \\f \\v \\b \\r
      ---
      duration_ms: 2.582292
      ...
    1..1
ok 1 - /Users/pulkitgupta/Desktop/node/test.js
  ---
  duration_ms: 49.498875
  ...
1..1
# tests 1
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 50.930334

Also modify test output's [test/message/test_runner_output.out , test/message/test_runner_output_cli.out]

Merge request reports

Loading