-
Notifications
You must be signed in to change notification settings - Fork 16
/
tap_reporters.javascript.txt
530 lines (453 loc) · 29.3 KB
/
tap_reporters.javascript.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
TAP_REPORTERS
TEST RUNNERS COMPARISON ==> #Prefer:
# - normal test runs: reporters coming with the test runner
# - reporting separate|abstracted from test run: TAP
#TAP:
# - produced by almost all runners
# - most kinds of reporters
# - some unique reporters: minimal sentence
# - prettiest reporters for: spec, markdown, static HTML, notify
#tape, tape-modern:
# - based on TAP
#Ava:
# - based on TAP
# - extra reporter (also prettiest): sentence
#Mocha:
# - prettiest reporters for: progress, nyan, plane, flat, styleless HTML, JSON
#node-tap:
# - very similar to Mocha
# - extra reporter (also prettiest): dot
#Jest:
# - not many reporters
# - prettiest reporters for: min spec, dynamic HTML
#Jasmine: reporters are not great
REPORTERS COMPARISON ==> #Prefer:
# - silent: if only need exit code
# - dot (or sentence if not available)
# - spec: if wants see passed tests
# - markdown, HTML: if needs those formats
# - TAP or JSON: if needs to parse
# - notify: combined with others
#For usual test running cases, prefer dot + notify
#Reporters not really documented: XUnit, Junit, NUnit, Teamcity, AppVeyor
#The following are sorted, for each category, from most to least prefered.
#silent:
# - some have flags, others can be done with > /dev/null
#bail:
# - (TAP) tap-bail
#minimal sentence:
# - (TAP) tap-pessimist
#sentence:
# - (Ava) default
# - (Mocha) min
# - (node-tap) min
# - (TAP) tap-min
# - (Jasmine) terminal-reporter
#dot:
# - (node-tap) classic
# - (Mocha) dot
# - (node-tap) dot
# - (TAP) tap-dot
#progress
# - (Mocha) progress
# - (node-tap) progress
#progress (nyan)
# - (Mocha) nyan
# - (node-tap) nyan
# - (TAP) tap-nyan
#progress (plane)
# - (Mocha) landing
# - (node-tap) landing
#flat
# - (Mocha) list
# - (node-tap) list
#min spec
# - (Jest) default
# - (TAP) tap-summary
# - (TAP) faucet
#spec
# - (TAP) tap-diff
# - (Mocha) spec
# - (node-tap) spec
# - (Jasmine) spec-reporter
# - (Jasmine) default
# - (TAP) tap-difflet
# - (TAP) tap-spec
# - (TAP) tap-prettify
# - (TAP) tap-simple
#Markdown
# - (TAP) tap-markdown
# - (node-tap) markdown
# - (Mocha) markdown
#styleless HTML
# - (Mocha) doc
# - (node-tap) doc
#static HTML
# - (TAP) tap-html
# - (Jest) jest-html-reporter
# - (TAP) tape-dom
# - (Jasmine) html-reporter
# - (TAP) tap-react-browser
#dynamic HTML
# - (Jest) jest-stare
# - (Mocha) simple-html-reporter
# - (Mocha) html
#TAP
# - (Ava) --tap
# - (node-tap) tap
# - (Mocha) tap
# - (Jest) jest-tap-reporter
# - (Jest) jest-json-to-tap
# - (Jasmine) tap-reporter
#colored TAP
# - (TAP) colortape
# - (TAP) tap-colorize
#JSON
# - (Mocha) json
# - (node-tap) json
# - (Jest) --json
# - (TAP) tap-json
#JSON stream:
# - (Mocha) json-stream
# - (node-tap) jsonstream
#notify
# - (TAP) tap-notify
# - (Jest) --notify
# - (Mocha) --growl
#XUnit
# - (Mocha) xunit
# - (node-tap) xunit
# - (TAP) tap-xunit
#JUnit
# - (Jasmine) junit-xml
# - (Jest) jest-junit
#NUnit
# - (Jasmine) nunit-xml
#Teamcity
# - (Jasmine) teamcity
# - (Jest) jest-teamcity
# - (Jest) jest-teamcity-reporter
# - (TAP) tap-teamcity
#AppVeyor
# - (Jasmine) appveyor
/=+===============================+=\
/ : : \
)==: BAIL :==(
\ :_______________________________: /
\=+===============================+=/
TAP-BAIL ==> ##1.0.0
##Stops stream on first failed assertion, then set exit code 1
##Parses with tap-parser
tap-bail ##Uses stdin|stdout
/=+===============================+=\
/ : : \
)==: MINIMAL SENTENCE :==(
\ :_______________________________: /
\=+===============================+=/
TAP-PESSIMIST ==> ##1.0.1
##Minimal failures-only:
## - for each failed assertion: INDEX, 'ASSERT_TITLE'
##Parses with tap-parser
##Sets exit code 1 if any failed assertion
tap-pessimist ##Uses stdin|stdout
/=+===============================+=\
/ : : \
)==: SENTENCE :==(
\ :_______________________________: /
\=+===============================+=/
TAP-MIN ==> ##1.1.0
##Sentence minimal:
## - final summary:
## - number of assertions passed|failed
## - each failed assertion 'TEST_TITLE: ASSERT_TITLE'
## - each unknown line (considered a failure)
##Parses with tap-parser
##Sets exit code 1 if any failed assertion
tap-min ##Uses stdin|stdout
TAP-MIN()->IOSTREAM ##
/=+===============================+=\
/ : : \
)==: DOT :==(
\ :_______________________________: /
\=+===============================+=/
TAP-DOT ==> ##1.0.5
##Dots:
## - for each assertion:
## - dot green|red according to "[not] ok"
## - final summary:
## - number of assertions total|passed|failed
## - errors: print each assertion 'ASSERT_TITLE' and YAML error props (as is)
##Parses with tap-out
##Sets exit code 1 if any failed assertion
dot ##Uses stdin|stdout
/=+===============================+=\
/ : : \
)==: PROGRESS (NYAN) :==(
\ :_______________________________: /
\=+===============================+=/
TAP-NYAN ==> ##1.1.0
##Nyan cat:
## - incrementally showing:
## - number of assertions total|passed|failed
## - final summary:
## - each failed assertion 'TEST_TITLE: ASSERT_TITLE'
##Parses with tap-parser
##Sets exit code 1 if any failed assertion
tap-nyan ##Uses stdin|stdout
TAP-NYAN()->IOSTREAM ##
/=+===============================+=\
/ : : \
)==: MIN SPEC :==(
\ :_______________________________: /
\=+===============================+=/
TAP-SUMMARY ==> ##4.0.0
##Minimal mocha-spec-like:
## - for each test:
## - 'TEST_TITLE'
## - green|red according to any failed assertion
## - duration
## - for each assertion:
## - increment pass|fail counter
## - final summary:
## - number of assertions total|passed|failed
## - each failed assertion:
## - 'ASSERT_TITLE'
## - YAML props: as is ("stack" prettified)
## - comments: each 'COMMENT' and total number
## - duration
## - plan
##Parses with tap-out
##Sets exit code 1 if any failed assertion
tap-summary ##Uses stdin|stdout
--no-ansi ##
--no-progress ##
TAP-SUMMARY([OPTS])->IOSTREAM ##OPTS:
## - ansi BOOL (def: true)
## - progress BOOL (def: true): if false, only show summary
## - duration BOOL (def: true)
FAUCET ==> ##0.0.1
##Minimal mocha-spec-like:
## - for each test: 'TEST_TITLE'
## - for each success assertion: show only last one (unless there is a failed one)
## - for each failed assertion:
## - 'ASSERT_TITLE', INDEX
## - YAML error props: as is
## - final summary:
## - number of assertions total|passed|failed (using comment # tests|pass)
##Parses with tap-parser
##Sets exit code 1 if any failed assertion
faucet [FILE|DIR] ##Uses stdin|stdout
##If FILE|DIR, run tape test runner and use its output instead
--width|w NUM ##Def: terminal width - 5
FAUCET([OPTS])->IOSTREAM ##OPTS: width
/=+===============================+=\
/ : : \
)==: SPEC :==(
\ :_______________________________: /
\=+===============================+=/
TAP-DIFF ==> ##0.1.1
##Spec-like with diff:
## - for each test: 'TEST_TITLE'
## - for each assertion:
## - 'ASSERT_TITLE'
## - green|red if ok|not ok
## - YAML error props:
## - expected and actual: colored diff (using jsondiffpatch)
## - "at": pretty printed
## - for each unknown line: as is
## - final summary:
## - number of assertions total|passed|failed
## - duration
##Parses with tap-parser
##Sets exit code 1 if any failed assertion
tap-diff ##Uses stdin|stdout
TAP-DIFF()->IOSTREAM ##
TAP-DIFFLET ==> ##0.7.1
##Spec-like with diff:
## - for each test: 'TEST_TITLE'
## - for each assertion:
## - 'ASSERT_TITLE'
## - green|red if ok|not ok
## - YAML error props:
## - expected|wanted and actual|found: colored diff (using difflet)
## - "at": pretty printed
## - others: as is
## - only failed assertions if OPTS.pessimistic true (def: false)
## - for each unknown line: as is
## - final summary:
## - number of assertions passed|failed
## - duration
##Parses with tap-parser-yaml
##Sets exit code 1 if any failed assertion
tap-difflet ##Uses stdin|stdout
--pessimistic|p ##
TAP-DIFFLET([OPTS])->IOSTREAM ##
TAP-SPEC ==> ##5.0.0
##Spec-like:
## - for each test: 'TEST_TITLE'
## - for each assertion:
## - 'ASSERT_TITLE'
## - green|red|cyan if ok|no ok|skip
## - YAML error props (as is)
## - for each unknown line: as is
## - final summary:
## - number of assertions total|passed|failed
## - each failed assertion 'ASSERT_TITLE', grouped by TEST_TITLE
## - duration
##Parses with tap-out
##Sets exit code 1 if any failed assertion
tap-spec ##Uses stdin|stdout
TAP-SPEC([OPTS])->IOSTREAM ##OPTS:
## - padding STR (def: ' ')
TAP-PRETTIFY ==> ##Spec-like
##Uses older Tap parser, and not very pretty, so not documented
TAP-SIMPLE ==> ##0.3.1
##Does not really work
##Spec-like with diff:
## - for each test: 'TEST_TITLE'
## - for each failed assertion:
## - 'ASSERT_TITLE'
## - YAML error props:
## - expected|wanted and actual|found: colored diff (using difflet)
## - "at": pretty printed
## - show context using YAML error prop "at" (required) then reading file path
## - for each unknown line: as is
## - final summary:
## - number of assertions total|passed|failed
## - duration
## - shows a spinner
##Parses with tap-out
##Sets exit code 1 if any failed assertion
tap-simple ##Uses stdin|stdout
TAP-SIMPLE()->IOSTREAM ##
/=+===============================+=\
/ : : \
)==: MARKDOWN :==(
\ :_______________________________: /
\=+===============================+=/
TAP-MARKDOWN ==> ##1.2.1
##Transforms to Markdown.
##Reuses tap-summary output but adding Tests|Summary headers
##Sets exit code 1 if any failed assertion
tap-markdown ##Uses stdin|stdout
--[no-]tidy|t ##Beautify Markdown (using tidy-markdown) (def: true)
TAP-MARKDOWN([OPTS])->IOSTREAM ##OPTS:
## - duration BOOL (def: true)
/=+===============================+=\
/ : : \
)==: STATIC HTML :==(
\ :_______________________________: /
\=+===============================+=/
TAP-HTML ==> ##0.2.0
##Single HTML file (with React bundled by Webpack):
## - for each test: 'TEST_TITLE', duration
## - for each assertion:
## - 'ASSERT_TITLE'
## - green|red if ok|not ok
## - YAML error props: as is
## - for each unknown line: as is
## - final summary:
## - number of assertions total|passed|failed|skipped|todo
## - duration
## - plan
##Parses with tap-parser
##Does not set exit code 1
tap-html ##Uses stdin
--output|o [FILE] ##Def: stdout
TAP-HTML(FUNC(REPORT))->IOSTREAM ##
TAP-HTML.generate(REPRT[,'FILE'])##
TAPE-DOM ==> ##Manipulates current HTML page to show tests. Only with tape, so not documented here
TAP-REACT-BROWSER ==> ##Manipulates current HTML page to show tests. Only with tape, so not documented here
/=+===============================+=\
/ : : \
)==: COLORED TAP :==(
\ :_______________________________: /
\=+===============================+=/
TAP-COLORIZE ==> ##1.2.0
##Color assertions in red|green and version in grey
##Parses with REGEXPs
##Does not set exit code 1
tap-colorize
--input|i [FILE] ##Def: stdin. Can be '-'
--output|o [FILE] ##Def: stdout. Can be '-'
--info|pass|fail COLOR ##Def: 'dim', 'bright green', 'bright red'
--reset ##Reset color after each line
TAP-COLORIZE([OPTS])->IOSTREAM ##OPTS: same as CLI
COLORTAPE ==> ##0.1.2
##Color assertions in red|green and 'TEST_TITLE' in cyan
##Parses with REGEXPs
##Sets exit code 1 if any failed assertion
colortape ##Uses stdin|stdout
COLORTAPE()->IOSTREAM ##
/=+===============================+=\
/ : : \
)==: JSON :==(
\ :_______________________________: /
\=+===============================+=/
TAP-JSON ==> ##1.0.0
##Transforms to OBJ:
## - stats:
## - asserts|passes|failure NUM
## - asserts OBJ_ARR:
## - ok BOOL
## - name 'ASSERT_TITLE'
## - comment 'TEST_TITLE'
## - number TEST_NUM
## - extra OBJ (YAML error properties, only operator|actual|expected)
##Parses with tap-parser
##Does not set exit code to 1
tap-json ##Uses stdin|stdout
##Also transforms to NDJSON (see its doc)
TAP-JSON()->IOSTREAM ##
/=+===============================+=\
/ : : \
)==: NOTIFY :==(
\ :_______________________________: /
\=+===============================+=/
TAP-NOTIFY ==> ##1.0.0
##Calls NODE-NOTIFIER(OPTS2) (see its doc) on completion with OPTS2:
## (if success)
## - message 'Test passed. NUM of NUM2 tests passed'
## - icon check
## (if failure)
## - message 'Test failed! NUM of NUM2 tests failed at AT'
## - AT is last YAML error property 'at'
## - icon cross
## - sound 'Basso'
##Can change with OPTS.passed|failed.title|icon|sound
##Parses with tap-parser
##Sets exit code 1 if any failed assertion
tap-notify ##Uses stdin|stdout
TAP-NOTIFY([OPTS])->IOSTREAM ##
/=+===============================+=\
/ : : \
)==: XUNIT :==(
\ :_______________________________: /
\=+===============================+=/
TAP-XUNIT ==> ##2.3.0
##Transforms to XUnit format
##Parses with tap-parser
##Sets exit code 1 if any failed assertion
tap-xunit ##Uses stdin|stdout
--dont-use-comments-as-test-names##
--replace-with-unicode-dot ##
--package STR ##
--strict ##
TAP-XUNIT([OPTS])->IOSTREAM ##OPTS:
## - dontUseCommentsAsTestNames BOOL (def: false)
## - replaceWithUnicodeDot BOOL (def: false)
## - package STR (def: '')
## - strict BOOL (def: false)
/=+===============================+=\
/ : : \
)==: TEAMCITY :==(
\ :_______________________________: /
\=+===============================+=/
TAP-TEAMCITY ==> ##3.0.2
##Transforms to Teamcity format
##Parses with tap-out
##Sets exit code 1 if any failed assertion
tap-teamcity ##Uses stdin|stdout
TAP-TEAMCITY()->IOSTREAM ##