-
Notifications
You must be signed in to change notification settings - Fork 16
/
node-test_reporters.node_cli.txt
46 lines (37 loc) · 2.78 KB
/
node-test_reporters.node_cli.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
NODE-TEST_REPORTERS
ALTERNATIVES ==> #See TAP format doc
VERSION ==> #Part of Node.js core
--test-reporter=STR [...] 18.15.0*#Among:
18.15.0*# - 'tap' (def)
18.15.0*# - 'spec'
18.15.0*# - 'dot'
18.19.0*# - 'junit'
20.11.0*# - 'lcov'
18.15.0*# - 'PATH' to custom REPORTER
--test-reporter
-destination=STR 18.15.0*#Among: 'stdout' (def), 'stderr' or 'PATH'
TAP ==> #TAP is output on stdout, and exit code is 0|1 depending on success
#See TAP documentation for details
T.diagnostic('MESSAGE') #TAP comment. Only if test failed
require('node:test/reporters')
.REPORTER 18.17.0*#Built-in REPORTER
REPORTER #Custom reporter
#ASYNC_ITERABLE of TEST_EVENTs
TEST_EVENT.type #One of: 'test:pass|fail|plan|start|diagnostic|coverage'
TEST_EVENT.data #OBJ:
# - name 'TITLE'
# - testNumber NUM
# - nesting NUM: sub-test depth
# - skip|todo BOOL
# (pass|fail)
# - details OBJ
# - duration_ms NUM
# - error ERROR
# (diagnostic)
# - message STR
# (coverage)
# - summary OBJ
# (plan)
# - count NUM