jasmine-core 3.4.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2f97eb23b1da29995d0fa9ea85c096b8e21c5ea3522a899047c167db7eea5d3
4
- data.tar.gz: 7dc28613f0d36c254d0bd7c02c5e13cd881131a600ffa37fed0af86dae99875b
3
+ metadata.gz: 413ab14189e6f5e61e2b520bdcaf065d5c5fe1ba21106bc2749b6c5016fa5fdd
4
+ data.tar.gz: 04006ebef8702957e1b784275e0d6fda55c2c0315472ca8e8d4d7dbb488d6918
5
5
  SHA512:
6
- metadata.gz: 9d291ed84e5c5489bf3da6d680cccdfc373ed2aa62fb9ceea2a57b07cbf1883ed50fbd1b331e38d2a0ca4f25edd50861c6ab2ea57c50694689a281e76a78994c
7
- data.tar.gz: 78ef4ce947e00b517e0c2e189615b174321f582552e9deabad5c7de1a71c24aa5d34e422d979f077ba2101d5b5ad9f0b04e2f03ccff7a896a01a087510608d64
6
+ metadata.gz: 6259f1b56267cf39e368b3d4f3933eeb0b4d34e256d41377c352c68e082e3db02a423333cac6f22cc99afb14319cfa91fbf64e1beeba3ec80c78dc1105fa76c3
7
+ data.tar.gz: 6adee23b1047e3c5152194336ebfafda90835fefffd84994d36c031edbdc8a5c7caedf212a12436ee26dbcecc001f987dbb1ac15fd90df68164b961e9cc0fe45
@@ -52,8 +52,7 @@ jasmineRequire.HtmlReporter = function(j$) {
52
52
  }
53
53
  };
54
54
 
55
- ResultsStateBuilder.prototype.specStarted = function(result) {
56
- };
55
+ ResultsStateBuilder.prototype.specStarted = function(result) {};
57
56
 
58
57
  ResultsStateBuilder.prototype.specDone = function(result) {
59
58
  this.currentParent.addChild(result, 'spec');
@@ -71,32 +70,42 @@ jasmineRequire.HtmlReporter = function(j$) {
71
70
  }
72
71
  };
73
72
 
74
-
75
-
76
73
  function HtmlReporter(options) {
77
- var config = function() { return (options.env && options.env.configuration()) || {}; },
74
+ var config = function() {
75
+ return (options.env && options.env.configuration()) || {};
76
+ },
78
77
  getContainer = options.getContainer,
79
78
  createElement = options.createElement,
80
79
  createTextNode = options.createTextNode,
81
80
  navigateWithNewParam = options.navigateWithNewParam || function() {},
82
- addToExistingQueryString = options.addToExistingQueryString || defaultQueryString,
81
+ addToExistingQueryString =
82
+ options.addToExistingQueryString || defaultQueryString,
83
83
  filterSpecs = options.filterSpecs,
84
- timer = options.timer || j$.noopTimer,
85
84
  htmlReporterMain,
86
85
  symbols,
87
86
  deprecationWarnings = [];
88
87
 
89
88
  this.initialize = function() {
90
89
  clearPrior();
91
- htmlReporterMain = createDom('div', {className: 'jasmine_html-reporter'},
92
- createDom('div', {className: 'jasmine-banner'},
93
- createDom('a', {className: 'jasmine-title', href: 'http://jasmine.github.io/', target: '_blank'}),
94
- createDom('span', {className: 'jasmine-version'}, j$.version)
90
+ htmlReporterMain = createDom(
91
+ 'div',
92
+ { className: 'jasmine_html-reporter' },
93
+ createDom(
94
+ 'div',
95
+ { className: 'jasmine-banner' },
96
+ createDom('a', {
97
+ className: 'jasmine-title',
98
+ href: 'http://jasmine.github.io/',
99
+ target: '_blank'
100
+ }),
101
+ createDom('span', { className: 'jasmine-version' }, j$.version)
95
102
  ),
96
- createDom('ul', {className: 'jasmine-symbol-summary'}),
97
- createDom('div', {className: 'jasmine-alert'}),
98
- createDom('div', {className: 'jasmine-results'},
99
- createDom('div', {className: 'jasmine-failures'})
103
+ createDom('ul', { className: 'jasmine-symbol-summary' }),
104
+ createDom('div', { className: 'jasmine-alert' }),
105
+ createDom(
106
+ 'div',
107
+ { className: 'jasmine-results' },
108
+ createDom('div', { className: 'jasmine-failures' })
100
109
  )
101
110
  );
102
111
  getContainer().appendChild(htmlReporterMain);
@@ -105,10 +114,9 @@ jasmineRequire.HtmlReporter = function(j$) {
105
114
  var totalSpecsDefined;
106
115
  this.jasmineStarted = function(options) {
107
116
  totalSpecsDefined = options.totalSpecsDefined || 0;
108
- timer.start();
109
117
  };
110
118
 
111
- var summary = createDom('div', {className: 'jasmine-summary'});
119
+ var summary = createDom('div', { className: 'jasmine-summary' });
112
120
 
113
121
  var stateBuilder = new ResultsStateBuilder();
114
122
 
@@ -133,20 +141,26 @@ jasmineRequire.HtmlReporter = function(j$) {
133
141
  this.specDone = function(result) {
134
142
  stateBuilder.specDone(result);
135
143
 
136
- if(noExpectations(result) && typeof console !== 'undefined' && typeof console.error !== 'undefined') {
137
- console.error('Spec \'' + result.fullName + '\' has no expectations.');
144
+ if (noExpectations(result)) {
145
+ var noSpecMsg = "Spec '" + result.fullName + "' has no expectations.";
146
+ if (result.status === 'failed') {
147
+ console.error(noSpecMsg);
148
+ } else {
149
+ console.warn(noSpecMsg);
150
+ }
138
151
  }
139
152
 
140
- if (!symbols){
153
+ if (!symbols) {
141
154
  symbols = find('.jasmine-symbol-summary');
142
155
  }
143
156
 
144
- symbols.appendChild(createDom('li', {
157
+ symbols.appendChild(
158
+ createDom('li', {
145
159
  className: this.displaySpecInCorrectFormat(result),
146
160
  id: 'spec_' + result.id,
147
161
  title: result.fullName
148
- }
149
- ));
162
+ })
163
+ );
150
164
 
151
165
  if (result.status === 'failed') {
152
166
  failures.push(failureDom(result));
@@ -156,12 +170,16 @@ jasmineRequire.HtmlReporter = function(j$) {
156
170
  };
157
171
 
158
172
  this.displaySpecInCorrectFormat = function(result) {
159
- return noExpectations(result) ? 'jasmine-empty' : this.resultStatus(result.status);
173
+ return noExpectations(result) && result.status === 'passed'
174
+ ? 'jasmine-empty'
175
+ : this.resultStatus(result.status);
160
176
  };
161
177
 
162
178
  this.resultStatus = function(status) {
163
- if(status === 'excluded') {
164
- return config().hideDisabled ? 'jasmine-excluded-no-display' : 'jasmine-excluded';
179
+ if (status === 'excluded') {
180
+ return config().hideDisabled
181
+ ? 'jasmine-excluded-no-display'
182
+ : 'jasmine-excluded';
165
183
  }
166
184
  return 'jasmine-' + status;
167
185
  };
@@ -171,16 +189,33 @@ jasmineRequire.HtmlReporter = function(j$) {
171
189
  var alert = find('.jasmine-alert');
172
190
  var order = doneResult && doneResult.order;
173
191
  var i;
174
- alert.appendChild(createDom('span', {className: 'jasmine-duration'}, 'finished in ' + timer.elapsed() / 1000 + 's'));
192
+ alert.appendChild(
193
+ createDom(
194
+ 'span',
195
+ { className: 'jasmine-duration' },
196
+ 'finished in ' + doneResult.totalTime / 1000 + 's'
197
+ )
198
+ );
175
199
 
176
200
  banner.appendChild(optionsMenu(config()));
177
201
 
178
202
  if (stateBuilder.specsExecuted < totalSpecsDefined) {
179
- var skippedMessage = 'Ran ' + stateBuilder.specsExecuted + ' of ' + totalSpecsDefined + ' specs - run all';
203
+ var skippedMessage =
204
+ 'Ran ' +
205
+ stateBuilder.specsExecuted +
206
+ ' of ' +
207
+ totalSpecsDefined +
208
+ ' specs - run all';
180
209
  var skippedLink = addToExistingQueryString('spec', '');
181
210
  alert.appendChild(
182
- createDom('span', {className: 'jasmine-bar jasmine-skipped'},
183
- createDom('a', {href: skippedLink, title: 'Run all specs'}, skippedMessage)
211
+ createDom(
212
+ 'span',
213
+ { className: 'jasmine-bar jasmine-skipped' },
214
+ createDom(
215
+ 'a',
216
+ { href: skippedLink, title: 'Run all specs' },
217
+ skippedMessage
218
+ )
184
219
  )
185
220
  );
186
221
  }
@@ -190,34 +225,66 @@ jasmineRequire.HtmlReporter = function(j$) {
190
225
  var failed = stateBuilder.failureCount + globalFailures.length > 0;
191
226
 
192
227
  if (totalSpecsDefined > 0 || failed) {
193
- statusBarMessage += pluralize('spec', stateBuilder.specsExecuted) + ', ' + pluralize('failure', stateBuilder.failureCount);
194
- if (stateBuilder.pendingSpecCount) { statusBarMessage += ', ' + pluralize('pending spec', stateBuilder.pendingSpecCount); }
228
+ statusBarMessage +=
229
+ pluralize('spec', stateBuilder.specsExecuted) +
230
+ ', ' +
231
+ pluralize('failure', stateBuilder.failureCount);
232
+ if (stateBuilder.pendingSpecCount) {
233
+ statusBarMessage +=
234
+ ', ' + pluralize('pending spec', stateBuilder.pendingSpecCount);
235
+ }
195
236
  }
196
237
 
197
238
  if (doneResult.overallStatus === 'passed') {
198
239
  statusBarClassName += ' jasmine-passed ';
199
240
  } else if (doneResult.overallStatus === 'incomplete') {
200
241
  statusBarClassName += ' jasmine-incomplete ';
201
- statusBarMessage = 'Incomplete: ' + doneResult.incompleteReason + ', ' + statusBarMessage;
242
+ statusBarMessage =
243
+ 'Incomplete: ' +
244
+ doneResult.incompleteReason +
245
+ ', ' +
246
+ statusBarMessage;
202
247
  } else {
203
248
  statusBarClassName += ' jasmine-failed ';
204
249
  }
205
250
 
206
251
  var seedBar;
207
252
  if (order && order.random) {
208
- seedBar = createDom('span', {className: 'jasmine-seed-bar'},
253
+ seedBar = createDom(
254
+ 'span',
255
+ { className: 'jasmine-seed-bar' },
209
256
  ', randomized with seed ',
210
- createDom('a', {title: 'randomized with seed ' + order.seed, href: seedHref(order.seed)}, order.seed)
257
+ createDom(
258
+ 'a',
259
+ {
260
+ title: 'randomized with seed ' + order.seed,
261
+ href: seedHref(order.seed)
262
+ },
263
+ order.seed
264
+ )
211
265
  );
212
266
  }
213
267
 
214
- alert.appendChild(createDom('span', {className: statusBarClassName}, statusBarMessage, seedBar));
268
+ alert.appendChild(
269
+ createDom(
270
+ 'span',
271
+ { className: statusBarClassName },
272
+ statusBarMessage,
273
+ seedBar
274
+ )
275
+ );
215
276
 
216
277
  var errorBarClassName = 'jasmine-bar jasmine-errored';
217
278
  var afterAllMessagePrefix = 'AfterAll ';
218
279
 
219
- for(i = 0; i < globalFailures.length; i++) {
220
- alert.appendChild(createDom('span', {className: errorBarClassName}, globalFailureMessage(globalFailures[i])));
280
+ for (i = 0; i < globalFailures.length; i++) {
281
+ alert.appendChild(
282
+ createDom(
283
+ 'span',
284
+ { className: errorBarClassName },
285
+ globalFailureMessage(globalFailures[i])
286
+ )
287
+ );
221
288
  }
222
289
 
223
290
  function globalFailureMessage(failure) {
@@ -225,7 +292,9 @@ jasmineRequire.HtmlReporter = function(j$) {
225
292
  var prefix = 'Error during loading: ' + failure.message;
226
293
 
227
294
  if (failure.filename) {
228
- return prefix + ' in ' + failure.filename + ' line ' + failure.lineno;
295
+ return (
296
+ prefix + ' in ' + failure.filename + ' line ' + failure.lineno
297
+ );
229
298
  } else {
230
299
  return prefix;
231
300
  }
@@ -237,9 +306,15 @@ jasmineRequire.HtmlReporter = function(j$) {
237
306
  addDeprecationWarnings(doneResult);
238
307
 
239
308
  var warningBarClassName = 'jasmine-bar jasmine-warning';
240
- for(i = 0; i < deprecationWarnings.length; i++) {
309
+ for (i = 0; i < deprecationWarnings.length; i++) {
241
310
  var warning = deprecationWarnings[i];
242
- alert.appendChild(createDom('span', {className: warningBarClassName}, 'DEPRECATION: ' + warning));
311
+ alert.appendChild(
312
+ createDom(
313
+ 'span',
314
+ { className: warningBarClassName },
315
+ 'DEPRECATION: ' + warning
316
+ )
317
+ );
243
318
  }
244
319
 
245
320
  var results = find('.jasmine-results');
@@ -249,13 +324,29 @@ jasmineRequire.HtmlReporter = function(j$) {
249
324
 
250
325
  if (failures.length) {
251
326
  alert.appendChild(
252
- createDom('span', {className: 'jasmine-menu jasmine-bar jasmine-spec-list'},
327
+ createDom(
328
+ 'span',
329
+ { className: 'jasmine-menu jasmine-bar jasmine-spec-list' },
253
330
  createDom('span', {}, 'Spec List | '),
254
- createDom('a', {className: 'jasmine-failures-menu', href: '#'}, 'Failures')));
331
+ createDom(
332
+ 'a',
333
+ { className: 'jasmine-failures-menu', href: '#' },
334
+ 'Failures'
335
+ )
336
+ )
337
+ );
255
338
  alert.appendChild(
256
- createDom('span', {className: 'jasmine-menu jasmine-bar jasmine-failure-list'},
257
- createDom('a', {className: 'jasmine-spec-list-menu', href: '#'}, 'Spec List'),
258
- createDom('span', {}, ' | Failures ')));
339
+ createDom(
340
+ 'span',
341
+ { className: 'jasmine-menu jasmine-bar jasmine-failure-list' },
342
+ createDom(
343
+ 'a',
344
+ { className: 'jasmine-spec-list-menu', href: '#' },
345
+ 'Spec List'
346
+ ),
347
+ createDom('span', {}, ' | Failures ')
348
+ )
349
+ );
259
350
 
260
351
  find('.jasmine-failures-menu').onclick = function() {
261
352
  setMenuModeTo('jasmine-failure-list');
@@ -276,17 +367,40 @@ jasmineRequire.HtmlReporter = function(j$) {
276
367
  return this;
277
368
 
278
369
  function failureDom(result) {
279
- var failure =
280
- createDom('div', {className: 'jasmine-spec-detail jasmine-failed'},
281
- failureDescription(result, stateBuilder.currentParent),
282
- createDom('div', {className: 'jasmine-messages'})
283
- );
370
+ var failure = createDom(
371
+ 'div',
372
+ { className: 'jasmine-spec-detail jasmine-failed' },
373
+ failureDescription(result, stateBuilder.currentParent),
374
+ createDom('div', { className: 'jasmine-messages' })
375
+ );
284
376
  var messages = failure.childNodes[1];
285
377
 
286
378
  for (var i = 0; i < result.failedExpectations.length; i++) {
287
379
  var expectation = result.failedExpectations[i];
288
- messages.appendChild(createDom('div', {className: 'jasmine-result-message'}, expectation.message));
289
- messages.appendChild(createDom('div', {className: 'jasmine-stack-trace'}, expectation.stack));
380
+ messages.appendChild(
381
+ createDom(
382
+ 'div',
383
+ { className: 'jasmine-result-message' },
384
+ expectation.message
385
+ )
386
+ );
387
+ messages.appendChild(
388
+ createDom(
389
+ 'div',
390
+ { className: 'jasmine-stack-trace' },
391
+ expectation.stack
392
+ )
393
+ );
394
+ }
395
+
396
+ if (result.failedExpectations.length === 0) {
397
+ messages.appendChild(
398
+ createDom(
399
+ 'div',
400
+ { className: 'jasmine-result-message' },
401
+ 'Spec has no expectations'
402
+ )
403
+ );
290
404
  }
291
405
 
292
406
  return failure;
@@ -300,9 +414,20 @@ jasmineRequire.HtmlReporter = function(j$) {
300
414
  continue;
301
415
  }
302
416
  if (resultNode.type === 'suite') {
303
- var suiteListNode = createDom('ul', {className: 'jasmine-suite', id: 'suite-' + resultNode.result.id},
304
- createDom('li', {className: 'jasmine-suite-detail jasmine-' + resultNode.result.status},
305
- createDom('a', {href: specHref(resultNode.result)}, resultNode.result.description)
417
+ var suiteListNode = createDom(
418
+ 'ul',
419
+ { className: 'jasmine-suite', id: 'suite-' + resultNode.result.id },
420
+ createDom(
421
+ 'li',
422
+ {
423
+ className:
424
+ 'jasmine-suite-detail jasmine-' + resultNode.result.status
425
+ },
426
+ createDom(
427
+ 'a',
428
+ { href: specHref(resultNode.result) },
429
+ resultNode.result.description
430
+ )
306
431
  )
307
432
  );
308
433
 
@@ -311,22 +436,34 @@ jasmineRequire.HtmlReporter = function(j$) {
311
436
  }
312
437
  if (resultNode.type === 'spec') {
313
438
  if (domParent.getAttribute('class') !== 'jasmine-specs') {
314
- specListNode = createDom('ul', {className: 'jasmine-specs'});
439
+ specListNode = createDom('ul', { className: 'jasmine-specs' });
315
440
  domParent.appendChild(specListNode);
316
441
  }
317
442
  var specDescription = resultNode.result.description;
318
- if(noExpectations(resultNode.result)) {
443
+ if (noExpectations(resultNode.result)) {
319
444
  specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription;
320
445
  }
321
- if(resultNode.result.status === 'pending' && resultNode.result.pendingReason !== '') {
322
- specDescription = specDescription + ' PENDING WITH MESSAGE: ' + resultNode.result.pendingReason;
446
+ if (
447
+ resultNode.result.status === 'pending' &&
448
+ resultNode.result.pendingReason !== ''
449
+ ) {
450
+ specDescription =
451
+ specDescription +
452
+ ' PENDING WITH MESSAGE: ' +
453
+ resultNode.result.pendingReason;
323
454
  }
324
455
  specListNode.appendChild(
325
- createDom('li', {
456
+ createDom(
457
+ 'li',
458
+ {
326
459
  className: 'jasmine-' + resultNode.result.status,
327
460
  id: 'spec-' + resultNode.result.id
328
461
  },
329
- createDom('a', {href: specHref(resultNode.result)}, specDescription)
462
+ createDom(
463
+ 'a',
464
+ { href: specHref(resultNode.result) },
465
+ specDescription
466
+ )
330
467
  )
331
468
  );
332
469
  }
@@ -334,37 +471,69 @@ jasmineRequire.HtmlReporter = function(j$) {
334
471
  }
335
472
 
336
473
  function optionsMenu(config) {
337
- var optionsMenuDom = createDom('div', { className: 'jasmine-run-options' },
474
+ var optionsMenuDom = createDom(
475
+ 'div',
476
+ { className: 'jasmine-run-options' },
338
477
  createDom('span', { className: 'jasmine-trigger' }, 'Options'),
339
- createDom('div', { className: 'jasmine-payload' },
340
- createDom('div', { className: 'jasmine-stop-on-failure' },
478
+ createDom(
479
+ 'div',
480
+ { className: 'jasmine-payload' },
481
+ createDom(
482
+ 'div',
483
+ { className: 'jasmine-stop-on-failure' },
341
484
  createDom('input', {
342
485
  className: 'jasmine-fail-fast',
343
486
  id: 'jasmine-fail-fast',
344
487
  type: 'checkbox'
345
488
  }),
346
- createDom('label', { className: 'jasmine-label', 'for': 'jasmine-fail-fast' }, 'stop execution on spec failure')),
347
- createDom('div', { className: 'jasmine-throw-failures' },
489
+ createDom(
490
+ 'label',
491
+ { className: 'jasmine-label', for: 'jasmine-fail-fast' },
492
+ 'stop execution on spec failure'
493
+ )
494
+ ),
495
+ createDom(
496
+ 'div',
497
+ { className: 'jasmine-throw-failures' },
348
498
  createDom('input', {
349
499
  className: 'jasmine-throw',
350
500
  id: 'jasmine-throw-failures',
351
501
  type: 'checkbox'
352
502
  }),
353
- createDom('label', { className: 'jasmine-label', 'for': 'jasmine-throw-failures' }, 'stop spec on expectation failure')),
354
- createDom('div', { className: 'jasmine-random-order' },
503
+ createDom(
504
+ 'label',
505
+ { className: 'jasmine-label', for: 'jasmine-throw-failures' },
506
+ 'stop spec on expectation failure'
507
+ )
508
+ ),
509
+ createDom(
510
+ 'div',
511
+ { className: 'jasmine-random-order' },
355
512
  createDom('input', {
356
513
  className: 'jasmine-random',
357
514
  id: 'jasmine-random-order',
358
515
  type: 'checkbox'
359
516
  }),
360
- createDom('label', { className: 'jasmine-label', 'for': 'jasmine-random-order' }, 'run tests in random order')),
361
- createDom('div', { className: 'jasmine-hide-disabled' },
517
+ createDom(
518
+ 'label',
519
+ { className: 'jasmine-label', for: 'jasmine-random-order' },
520
+ 'run tests in random order'
521
+ )
522
+ ),
523
+ createDom(
524
+ 'div',
525
+ { className: 'jasmine-hide-disabled' },
362
526
  createDom('input', {
363
527
  className: 'jasmine-disabled',
364
528
  id: 'jasmine-hide-disabled',
365
529
  type: 'checkbox'
366
530
  }),
367
- createDom('label', { className: 'jasmine-label', 'for': 'jasmine-hide-disabled' }, 'hide disabled tests'))
531
+ createDom(
532
+ 'label',
533
+ { className: 'jasmine-label', for: 'jasmine-hide-disabled' },
534
+ 'hide disabled tests'
535
+ )
536
+ )
368
537
  )
369
538
  );
370
539
 
@@ -374,13 +543,17 @@ jasmineRequire.HtmlReporter = function(j$) {
374
543
  navigateWithNewParam('failFast', !config.failFast);
375
544
  };
376
545
 
377
- var throwCheckbox = optionsMenuDom.querySelector('#jasmine-throw-failures');
546
+ var throwCheckbox = optionsMenuDom.querySelector(
547
+ '#jasmine-throw-failures'
548
+ );
378
549
  throwCheckbox.checked = config.oneFailurePerSpec;
379
550
  throwCheckbox.onclick = function() {
380
551
  navigateWithNewParam('throwFailures', !config.oneFailurePerSpec);
381
552
  };
382
553
 
383
- var randomCheckbox = optionsMenuDom.querySelector('#jasmine-random-order');
554
+ var randomCheckbox = optionsMenuDom.querySelector(
555
+ '#jasmine-random-order'
556
+ );
384
557
  randomCheckbox.checked = config.random;
385
558
  randomCheckbox.onclick = function() {
386
559
  navigateWithNewParam('random', !config.random);
@@ -398,7 +571,10 @@ jasmineRequire.HtmlReporter = function(j$) {
398
571
 
399
572
  optionsTrigger.onclick = function() {
400
573
  if (isOpen.test(optionsPayload.className)) {
401
- optionsPayload.className = optionsPayload.className.replace(isOpen, '');
574
+ optionsPayload.className = optionsPayload.className.replace(
575
+ isOpen,
576
+ ''
577
+ );
402
578
  } else {
403
579
  optionsPayload.className += ' jasmine-open';
404
580
  }
@@ -408,14 +584,24 @@ jasmineRequire.HtmlReporter = function(j$) {
408
584
  }
409
585
 
410
586
  function failureDescription(result, suite) {
411
- var wrapper = createDom('div', {className: 'jasmine-description'},
412
- createDom('a', {title: result.description, href: specHref(result)}, result.description)
587
+ var wrapper = createDom(
588
+ 'div',
589
+ { className: 'jasmine-description' },
590
+ createDom(
591
+ 'a',
592
+ { title: result.description, href: specHref(result) },
593
+ result.description
594
+ )
413
595
  );
414
596
  var suiteLink;
415
597
 
416
598
  while (suite && suite.parent) {
417
599
  wrapper.insertBefore(createTextNode(' > '), wrapper.firstChild);
418
- suiteLink = createDom('a', {href: suiteHref(suite)}, suite.result.description);
600
+ suiteLink = createDom(
601
+ 'a',
602
+ { href: suiteHref(suite) },
603
+ suite.result.description
604
+ );
419
605
  wrapper.insertBefore(suiteLink, wrapper.firstChild);
420
606
 
421
607
  suite = suite.parent;
@@ -437,7 +623,7 @@ jasmineRequire.HtmlReporter = function(j$) {
437
623
 
438
624
  function addDeprecationWarnings(result) {
439
625
  if (result && result.deprecationWarnings) {
440
- for(var i = 0; i < result.deprecationWarnings.length; i++) {
626
+ for (var i = 0; i < result.deprecationWarnings.length; i++) {
441
627
  var warning = result.deprecationWarnings[i].message;
442
628
  if (!j$.util.arrayContains(warning)) {
443
629
  deprecationWarnings.push(warning);
@@ -454,7 +640,7 @@ jasmineRequire.HtmlReporter = function(j$) {
454
640
  // return the reporter
455
641
  var oldReporter = find('');
456
642
 
457
- if(oldReporter) {
643
+ if (oldReporter) {
458
644
  getContainer().removeChild(oldReporter);
459
645
  }
460
646
  }
@@ -486,7 +672,7 @@ jasmineRequire.HtmlReporter = function(j$) {
486
672
  }
487
673
 
488
674
  function pluralize(singular, count) {
489
- var word = (count == 1 ? singular : singular + 's');
675
+ var word = count == 1 ? singular : singular + 's';
490
676
 
491
677
  return '' + count + ' ' + word;
492
678
  }
@@ -508,8 +694,13 @@ jasmineRequire.HtmlReporter = function(j$) {
508
694
  }
509
695
 
510
696
  function noExpectations(result) {
511
- return (result.failedExpectations.length + result.passedExpectations.length) === 0 &&
512
- result.status === 'passed';
697
+ var allExpectations =
698
+ result.failedExpectations.length + result.passedExpectations.length;
699
+
700
+ return (
701
+ allExpectations === 0 &&
702
+ (result.status === 'passed' || result.status === 'failed')
703
+ );
513
704
  }
514
705
 
515
706
  function hasActiveSpec(resultNode) {
@@ -532,7 +723,10 @@ jasmineRequire.HtmlReporter = function(j$) {
532
723
 
533
724
  jasmineRequire.HtmlSpecFilter = function() {
534
725
  function HtmlSpecFilter(options) {
535
- var filterString = options && options.filterString() && options.filterString().replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
726
+ var filterString =
727
+ options &&
728
+ options.filterString() &&
729
+ options.filterString().replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
536
730
  var filterPattern = new RegExp(filterString);
537
731
 
538
732
  this.matches = function(specName) {
@@ -569,9 +763,11 @@ jasmineRequire.ResultsNode = function() {
569
763
 
570
764
  jasmineRequire.QueryString = function() {
571
765
  function QueryString(options) {
572
-
573
766
  this.navigateWithNewParam = function(key, value) {
574
- options.getWindowLocation().search = this.fullStringWithNewParam(key, value);
767
+ options.getWindowLocation().search = this.fullStringWithNewParam(
768
+ key,
769
+ value
770
+ );
575
771
  };
576
772
 
577
773
  this.fullStringWithNewParam = function(key, value) {
@@ -589,7 +785,9 @@ jasmineRequire.QueryString = function() {
589
785
  function toQueryString(paramMap) {
590
786
  var qStrPairs = [];
591
787
  for (var prop in paramMap) {
592
- qStrPairs.push(encodeURIComponent(prop) + '=' + encodeURIComponent(paramMap[prop]));
788
+ qStrPairs.push(
789
+ encodeURIComponent(prop) + '=' + encodeURIComponent(paramMap[prop])
790
+ );
593
791
  }
594
792
  return '?' + qStrPairs.join('&');
595
793
  }
@@ -613,7 +811,6 @@ jasmineRequire.QueryString = function() {
613
811
 
614
812
  return paramMap;
615
813
  }
616
-
617
814
  }
618
815
 
619
816
  return QueryString;