-
Notifications
You must be signed in to change notification settings - Fork 16
/
jasmine_reporters.node_cli.txt
142 lines (115 loc) · 9.73 KB
/
jasmine_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
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
JASMINE_REPORTERS
ALTERNATIVES ==> #See TAP format doc
/=+===============================+=\
/ : : \
)==: CORE :==(
\ :_______________________________: /
\=+===============================+=/
jasmine --reporter=REPORTER #Most REPORTER do not support this
#Def: ConsoleReporter + JsApiReporter
JASMINE.env #ENV
ENV.clearReporters() #
ENV.addReporter(REPORTER) #
/=+===============================+=\
/ : : \
)==: CUSTOM :==(
\ :_______________________________: /
\=+===============================+=/
REPORTER.*(...) #Can all be async by using extra FUNC argument or returning PROMISE
REPORTER.jasmineStarted(OBJ) #OBJ:
# - totalSpecsDefined NUM
# - order 'random|'
REPORTER.jasmineDone(OBJ) #OBJ:
# - overallStatus 'passed|failed|incomplete'
# - incompleteReason STR
# - order 'random|'
# - failedExpectations|deprecationWarnings OBJ_ARR: see below
REPORTER.suiteStarted|Done(SUITE) #SUITE:
# - id STR: opaque id
# - description STR: from describe(STR)
# - fullName "[PARENT_DESCRIPTION] DESCRIPTION"
# - failedExpectations|deprecationWarnings OBJ_ARR: see below
REPORTER.specStarted|Done(TEST) #TEST:
# - id STR
# - description|fullName STR: same as above, but for it(STR)
# (fullName concatene suite fullName)
# - status 'pending|passed|failed': only define for specDone
# - pendingReason STR
# - failedExpectations|passedExpectations|deprecationWarnings OBJ_ARR:
# - actual VAL
# - expected VAL2 or, if several, ARR_VAL
# - matcherName STR: e.g. "toEqual"
# - message STR: e.g. "Expected VAL to equal VAL2"
# - passed BOOL
# - stack STR: stack error message
/=+===============================+=\
/ : : \
)==: LIST :==(
\ :_______________________________: /
\=+===============================+=/
new JASMINE.ConsoleReporter([OPTS]) #REPORTER, with OPTS:
# - print([STR...]): e.g. console.log
# - timer:
# - OBJ: start(), elapsed()->NUM (in ms)
# - should use new JASMINE.Timer()
# - showColors BOOL (def: false)
# - onComplete FUNC: like JASMIN.onComplete()
new JASMINE.JsApiReporter([OPTS]) #REPORTER, with OPTS:
# - timer: like ConsoleReporter
jsApiReporter #JSAPIREPORTER
JSAPIREPORTER.executionTime()->NUM #
JSAPIREPORTER.status()->STR #
JSAPIREPORTER.suites()->SUITE_ARR #
JSAPIREPORTER.suiteResults(NUM, NUM2)->SUITE_ARR#Same with ARR.slice(...)
JSAPIREPORTER.specs()->TEST_ARR #
JSAPIREPORTER.specResults(NUM, NUM2)->TEST_ARR #Same with ARR.slice(...)
new JASMINE.HtmlReporter([OPTS]) #REPORTER.
#Look at boot.js to customize (e.g. do in a <div> instead of <body>)
ENVVAR MAX_PRETTY_PRINT_ARRAY_LENGTH #Def: 50
ENVVAR MAX_PRETTY_PRINT_CHARS #Def: 1000
ENVVAR MAX_PRETTY_PRINT_DEPTH #Def: 8
new SpecReporter([OPTS]) ##Nice reporter similar to Mocha's spec (prefer)
##Module 'jasmine-spec-reporter' (7.0.0)
##OPTS:
## - suite:
## - displayNumber BOOL (def: false): prepend suite name with incrementing number
## - spec (each spec):
## - displayErrorMessages BOOL (def: true)
## - displayStackTrace BOOL (def: false)
## - displaySuccessful|Failed|Pending BOOL (def: false)
## - displayDuration BOOL (def: false)
## - summary (summary at end):
## - displayErrorMessages BOOL (def: true)
## - displayStackTrace BOOL (def: false)
## - displaySuccessful|Failed|Pending BOOL (def: true only for Failed)
## - displayDuration BOOL (def: true)
## - colors (using colors.js):
## - enabled BOOL (def: true)
## - successful|failed|pending 'COLOR'
## - prefixes:
## - successful|failed|pending 'COLOR'
## - stacktrace:
## - filter(STR)->STR: filter stack trace
## - print (like other reporters)
## - customProcessors OBJ_ARR, customOptions OBJ: customized output (see online doc)
## - displayStackTrace 'none', 'raw' or 'pretty'
new TerminalReporter([OPTS]) ##Nicer reporter
##Module 'jasmine-reporters' (2.4.0)
##OPTS:
## - color BOOL (def: false)
## - verbosity 0-3 (def: 2)
## - showStack BOOL (def: false)
new TapReporter() ##TAP reporter (see TAP format doc for details)
##Module 'jasmine-reporters'
new JUnitXmlReporter([OPTS]) ##JUnit XML reporter
##Module 'jasmine-reporters'
##OPTS:
## - suppressDisabled BOOL
new NUnitXmlReporter([OPTS]) ##NUnit XML reporter
##Module 'jasmine-reporters'
new AppVeyorReporter([OPTS]) ##AppVeyor reporter
##Module 'jasmine-reporters'
new TeamCityReporter() ##TeamCity reporter
##Module 'jasmine-reporters'