Supported flags - uhop/tape-six GitHub Wiki

Test output is controlled by flags, which is a string of characters. If a character is lowercase, it is disabled, otherwise it is enabled. The default is no flags set. Characters are processed from left to right and can override previous flags.

The following flags are available:

  • F is "Failures only". Only failed tests are shown in the report.
  • T is "show Time". It controls if the time taken to run the test is shown in the report.
  • B is "show Banner". It controls if the highly visible banner with results is shown in the report.
  • D is "show Data". It controls if the data of a failed test is shown in the report.
  • O is "fail Once". If a test fails, the testing is immediately stopped.
  • N is "show assert Number". It controls if an assert number is shown in the report.
  • M is "Monochrome". It controls if colors can be used in console output.
  • C is "don't Capture Console". By default, console output is captured and shown in the report. If you want to disable it, e.g., you capture logging separately, set this flag.
  • H is "Hide streams". By default, streams and console output are shown in the report. If you want to disable it, set this flag.

Utilities like tape6, tape6-bun, tape6-node, tape6-deno take flags using --flags option:

# show only failures
# stop at the first error
tape6 --flags FO tests/test-general.js
# equivalent:
tape6 --flags=FO tests/test-general.js

When you run individual test files and want to change defaults, you can set the flags using the TAPE6_FLAGS environment variable:

TAPE6_FLAGS=FO node tests/test-general.js

Browser tests read the string of flags from a query parameter called flags.

Example: http://localhost:3000/?flags=FO

Additional flags used by the web application:

  • S is "show Stack". It is used to show the stack of a failed test in the report. This setting can be changed in the UI of the web application. It defines the initial state of the flag.
  • L is "show Log". If it is set, the TAP reporter (see below) will duplicate the log of each test in the browser console.
  • J is "use JSONL". It controls if JSONL reporter is used instead of the TAP reporter.