1
- describe ( "ConsoleReporter" , function ( ) {
2
- var ConsoleReporter = require ( '../../lib/reporters/console_reporter' ) ,
3
- jasmineCorePath = 'path/to/jasmine/core/jasmine.js' ;
1
+ const ConsoleReporter = require ( '../../lib/reporters/console_reporter' ) ;
2
+ const jasmineCorePath = 'path/to/jasmine/core/jasmine.js' ;
4
3
5
- var fakeStack = [ 'foo' + jasmineCorePath ,
4
+ describe ( "ConsoleReporter" , function ( ) {
5
+ const fakeStack = [ 'foo' + jasmineCorePath ,
6
6
'bar ' + jasmineCorePath ,
7
7
'line of useful stack trace' ,
8
8
'baz ' + jasmineCorePath ] . join ( '\n' ) ;
9
9
10
10
beforeEach ( function ( ) {
11
11
this . out = ( function ( ) {
12
- var output = "" ;
12
+ let output = "" ;
13
13
return {
14
14
print : function ( str ) {
15
15
output += str ;
@@ -25,7 +25,7 @@ describe("ConsoleReporter", function() {
25
25
} ) ;
26
26
27
27
it ( "reports that the suite has started to the console" , function ( ) {
28
- var reporter = new ConsoleReporter ( ) ;
28
+ const reporter = new ConsoleReporter ( ) ;
29
29
30
30
reporter . setOptions ( {
31
31
print : this . out . print
@@ -38,7 +38,7 @@ describe("ConsoleReporter", function() {
38
38
39
39
describe ( "When order information is passed to jasmineStarted" , function ( ) {
40
40
it ( "reports the seed number when randomized" , function ( ) {
41
- var reporter = new ConsoleReporter ( ) ;
41
+ const reporter = new ConsoleReporter ( ) ;
42
42
reporter . setOptions ( {
43
43
print : this . out . print
44
44
} ) ;
@@ -54,7 +54,7 @@ describe("ConsoleReporter", function() {
54
54
} ) ;
55
55
56
56
it ( "does not report order info when not randomized" , function ( ) {
57
- var reporter = new ConsoleReporter ( ) ;
57
+ const reporter = new ConsoleReporter ( ) ;
58
58
reporter . setOptions ( {
59
59
print : this . out . print
60
60
} ) ;
@@ -70,7 +70,7 @@ describe("ConsoleReporter", function() {
70
70
} ) ;
71
71
72
72
it ( "setOptions should not override existing options if set multiple times" , function ( ) {
73
- var reporter = new ConsoleReporter ( ) ;
73
+ const reporter = new ConsoleReporter ( ) ;
74
74
75
75
reporter . setOptions ( {
76
76
print : this . out . print ,
@@ -94,7 +94,7 @@ describe("ConsoleReporter", function() {
94
94
} ) ;
95
95
96
96
it ( "reports a passing spec as a dot" , function ( ) {
97
- var reporter = new ConsoleReporter ( ) ;
97
+ const reporter = new ConsoleReporter ( ) ;
98
98
reporter . setOptions ( {
99
99
print : this . out . print
100
100
} ) ;
@@ -105,7 +105,7 @@ describe("ConsoleReporter", function() {
105
105
} ) ;
106
106
107
107
it ( "does not report a disabled spec" , function ( ) {
108
- var reporter = new ConsoleReporter ( ) ;
108
+ const reporter = new ConsoleReporter ( ) ;
109
109
reporter . setOptions ( {
110
110
print : this . out . print
111
111
} ) ;
@@ -116,7 +116,7 @@ describe("ConsoleReporter", function() {
116
116
} ) ;
117
117
118
118
it ( "reports a failing spec as an 'F'" , function ( ) {
119
- var reporter = new ConsoleReporter ( ) ;
119
+ const reporter = new ConsoleReporter ( ) ;
120
120
reporter . setOptions ( {
121
121
print : this . out . print
122
122
} ) ;
@@ -127,7 +127,7 @@ describe("ConsoleReporter", function() {
127
127
} ) ;
128
128
129
129
it ( "reports a pending spec as a '*'" , function ( ) {
130
- var reporter = new ConsoleReporter ( ) ;
130
+ const reporter = new ConsoleReporter ( ) ;
131
131
reporter . setOptions ( {
132
132
print : this . out . print
133
133
} ) ;
@@ -138,7 +138,7 @@ describe("ConsoleReporter", function() {
138
138
} ) ;
139
139
140
140
it ( "alerts user if there are no specs" , function ( ) {
141
- var reporter = new ConsoleReporter ( ) ;
141
+ const reporter = new ConsoleReporter ( ) ;
142
142
reporter . setOptions ( {
143
143
print : this . out . print
144
144
} ) ;
@@ -151,7 +151,7 @@ describe("ConsoleReporter", function() {
151
151
} ) ;
152
152
153
153
it ( "reports the seed number when running in random order" , function ( ) {
154
- var reporter = new ConsoleReporter ( ) ;
154
+ const reporter = new ConsoleReporter ( ) ;
155
155
reporter . setOptions ( {
156
156
print : this . out . print
157
157
} ) ;
@@ -167,7 +167,7 @@ describe("ConsoleReporter", function() {
167
167
} ) ;
168
168
169
169
it ( "allows the seed reproduction command to be overridden" , function ( ) {
170
- var reporter = new ConsoleReporter ( "jasmine-some-other-tool" ) ;
170
+ const reporter = new ConsoleReporter ( "jasmine-some-other-tool" ) ;
171
171
reporter . setOptions ( {
172
172
print : this . out . print ,
173
173
randomSeedReproductionCmd : function ( seed ) {
@@ -186,7 +186,7 @@ describe("ConsoleReporter", function() {
186
186
} ) ;
187
187
188
188
it ( "reports a summary when done (singular spec and time)" , function ( ) {
189
- var reporter = new ConsoleReporter ( ) ;
189
+ const reporter = new ConsoleReporter ( ) ;
190
190
reporter . setOptions ( {
191
191
print : this . out . print ,
192
192
} ) ;
@@ -204,7 +204,7 @@ describe("ConsoleReporter", function() {
204
204
} ) ;
205
205
206
206
it ( "reports a summary when done (pluralized specs and seconds)" , function ( ) {
207
- var reporter = new ConsoleReporter ( ) ;
207
+ const reporter = new ConsoleReporter ( ) ;
208
208
reporter . setOptions ( {
209
209
print : this . out . print ,
210
210
} ) ;
@@ -237,7 +237,7 @@ describe("ConsoleReporter", function() {
237
237
} ) ;
238
238
239
239
it ( "reports a summary when done that indicates the number of specs run (when it's less that the full number of specs)" , function ( ) {
240
- var reporter = new ConsoleReporter ( ) ;
240
+ const reporter = new ConsoleReporter ( ) ;
241
241
reporter . setOptions ( {
242
242
print : this . out . print ,
243
243
} ) ;
@@ -254,7 +254,7 @@ describe("ConsoleReporter", function() {
254
254
} ) ;
255
255
256
256
it ( "reports a summary when done that includes the failed spec number before the full name of a failing spec" , function ( ) {
257
- var reporter = new ConsoleReporter ( ) ;
257
+ const reporter = new ConsoleReporter ( ) ;
258
258
reporter . setOptions ( {
259
259
print : this . out . print ,
260
260
jasmineCorePath : jasmineCorePath
@@ -286,7 +286,7 @@ describe("ConsoleReporter", function() {
286
286
} ) ;
287
287
288
288
it ( "reports a summary when done that includes stack traces without jasmine internals for a failing suite" , function ( ) {
289
- var reporter = new ConsoleReporter ( ) ;
289
+ const reporter = new ConsoleReporter ( ) ;
290
290
reporter . setOptions ( {
291
291
print : this . out . print ,
292
292
jasmineCorePath : jasmineCorePath
@@ -320,7 +320,7 @@ describe("ConsoleReporter", function() {
320
320
} ) ;
321
321
322
322
it ( "reports a summary when done in case that stack is somehow undefined" , function ( ) {
323
- var reporter = new ConsoleReporter ( ) ;
323
+ const reporter = new ConsoleReporter ( ) ;
324
324
reporter . setOptions ( {
325
325
print : this . out . print ,
326
326
jasmineCorePath : jasmineCorePath
@@ -352,11 +352,11 @@ describe("ConsoleReporter", function() {
352
352
} ) ;
353
353
354
354
it ( "reports a summary when done that includes custom filtered stack traces for a failing suite" , function ( ) {
355
- var stackLine = 'custom line of stack' ;
356
- var customStackFilter = function ( stack ) {
355
+ const stackLine = 'custom line of stack' ;
356
+ const customStackFilter = function ( stack ) {
357
357
return stackLine ;
358
358
} ;
359
- var reporter = new ConsoleReporter ( ) ;
359
+ const reporter = new ConsoleReporter ( ) ;
360
360
reporter . setOptions ( {
361
361
print : this . out . print ,
362
362
stackFilter : customStackFilter
@@ -389,7 +389,7 @@ describe("ConsoleReporter", function() {
389
389
} ) ;
390
390
391
391
it ( "reports a summary when done that includes which specs are pending and their reasons" , function ( ) {
392
- var reporter = new ConsoleReporter ( ) ;
392
+ const reporter = new ConsoleReporter ( ) ;
393
393
reporter . setOptions ( {
394
394
print : this . out . print ,
395
395
jasmineCorePath : jasmineCorePath
@@ -413,7 +413,7 @@ describe("ConsoleReporter", function() {
413
413
} ) ;
414
414
415
415
it ( "reports a summary when done that includes the reason for an incomplete suite" , function ( ) {
416
- var reporter = new ConsoleReporter ( ) ;
416
+ const reporter = new ConsoleReporter ( ) ;
417
417
reporter . setOptions ( {
418
418
print : this . out . print ,
419
419
jasmineCorePath : jasmineCorePath
@@ -432,7 +432,7 @@ describe("ConsoleReporter", function() {
432
432
} ) ;
433
433
434
434
it ( "reports a summary when done that shows info for a failed spec with no expectations" , function ( ) {
435
- var reporter = new ConsoleReporter ( ) ;
435
+ const reporter = new ConsoleReporter ( ) ;
436
436
reporter . setOptions ( {
437
437
print : this . out . print ,
438
438
jasmineCorePath : jasmineCorePath
@@ -456,7 +456,7 @@ describe("ConsoleReporter", function() {
456
456
} ) ;
457
457
458
458
it ( 'reports a summary without "no expectations" message for a spec having failed expectations' , function ( ) {
459
- var reporter = new ConsoleReporter ( ) ;
459
+ const reporter = new ConsoleReporter ( ) ;
460
460
reporter . setOptions ( {
461
461
print : this . out . print ,
462
462
jasmineCorePath : jasmineCorePath
@@ -485,7 +485,7 @@ describe("ConsoleReporter", function() {
485
485
} ) ;
486
486
487
487
it ( 'reports a summary without a "no expectations" message for a spec having passed expectations' , function ( ) {
488
- var reporter = new ConsoleReporter ( ) ;
488
+ const reporter = new ConsoleReporter ( ) ;
489
489
reporter . setOptions ( {
490
490
print : this . out . print ,
491
491
jasmineCorePath : jasmineCorePath
@@ -524,7 +524,7 @@ describe("ConsoleReporter", function() {
524
524
} ) ;
525
525
526
526
it ( "displays all afterAll exceptions" , function ( ) {
527
- var reporter = new ConsoleReporter ( ) ;
527
+ const reporter = new ConsoleReporter ( ) ;
528
528
reporter . setOptions ( {
529
529
print : this . out . print ,
530
530
showColors : true
@@ -541,7 +541,7 @@ describe("ConsoleReporter", function() {
541
541
542
542
describe ( "with color" , function ( ) {
543
543
it ( "reports that the suite has started to the console" , function ( ) {
544
- var reporter = new ConsoleReporter ( ) ;
544
+ const reporter = new ConsoleReporter ( ) ;
545
545
reporter . setOptions ( {
546
546
print : this . out . print ,
547
547
showColors : true
@@ -553,7 +553,7 @@ describe("ConsoleReporter", function() {
553
553
} ) ;
554
554
555
555
it ( "reports a passing spec as a dot" , function ( ) {
556
- var reporter = new ConsoleReporter ( ) ;
556
+ const reporter = new ConsoleReporter ( ) ;
557
557
reporter . setOptions ( {
558
558
print : this . out . print ,
559
559
showColors : true
@@ -565,7 +565,7 @@ describe("ConsoleReporter", function() {
565
565
} ) ;
566
566
567
567
it ( "does not report a disabled spec" , function ( ) {
568
- var reporter = new ConsoleReporter ( ) ;
568
+ const reporter = new ConsoleReporter ( ) ;
569
569
reporter . setOptions ( {
570
570
print : this . out . print ,
571
571
showColors : true
@@ -577,7 +577,7 @@ describe("ConsoleReporter", function() {
577
577
} ) ;
578
578
579
579
it ( "reports a failing spec as an 'F'" , function ( ) {
580
- var reporter = new ConsoleReporter ( ) ;
580
+ const reporter = new ConsoleReporter ( ) ;
581
581
reporter . setOptions ( {
582
582
print : this . out . print ,
583
583
showColors : true
0 commit comments