jasmine-core 2.9.0 → 2.99.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jasmine-core/jasmine-html.js +24 -1
  3. data/lib/jasmine-core/jasmine.css +1 -0
  4. data/lib/jasmine-core/jasmine.js +50 -6
  5. data/lib/jasmine-core/version.rb +1 -1
  6. metadata +3 -84
  7. data/lib/jasmine-core/spec/console/ConsoleReporterSpec.js +0 -270
  8. data/lib/jasmine-core/spec/core/CallTrackerSpec.js +0 -130
  9. data/lib/jasmine-core/spec/core/ClearStackSpec.js +0 -137
  10. data/lib/jasmine-core/spec/core/ClockSpec.js +0 -754
  11. data/lib/jasmine-core/spec/core/DelayedFunctionSchedulerSpec.js +0 -270
  12. data/lib/jasmine-core/spec/core/EnvSpec.js +0 -200
  13. data/lib/jasmine-core/spec/core/ExceptionFormatterSpec.js +0 -63
  14. data/lib/jasmine-core/spec/core/ExceptionsSpec.js +0 -68
  15. data/lib/jasmine-core/spec/core/ExpectationResultSpec.js +0 -61
  16. data/lib/jasmine-core/spec/core/ExpectationSpec.js +0 -434
  17. data/lib/jasmine-core/spec/core/GlobalErrorsSpec.js +0 -110
  18. data/lib/jasmine-core/spec/core/JsApiReporterSpec.js +0 -259
  19. data/lib/jasmine-core/spec/core/MockDateSpec.js +0 -200
  20. data/lib/jasmine-core/spec/core/PrettyPrintSpec.js +0 -337
  21. data/lib/jasmine-core/spec/core/QueueRunnerSpec.js +0 -620
  22. data/lib/jasmine-core/spec/core/ReportDispatcherSpec.js +0 -79
  23. data/lib/jasmine-core/spec/core/SpecSpec.js +0 -441
  24. data/lib/jasmine-core/spec/core/SpyRegistrySpec.js +0 -356
  25. data/lib/jasmine-core/spec/core/SpySpec.js +0 -127
  26. data/lib/jasmine-core/spec/core/SpyStrategySpec.js +0 -159
  27. data/lib/jasmine-core/spec/core/SuiteSpec.js +0 -155
  28. data/lib/jasmine-core/spec/core/TimerSpec.js +0 -31
  29. data/lib/jasmine-core/spec/core/TreeProcessorSpec.js +0 -756
  30. data/lib/jasmine-core/spec/core/UserContextSpec.js +0 -54
  31. data/lib/jasmine-core/spec/core/UtilSpec.js +0 -99
  32. data/lib/jasmine-core/spec/core/asymmetric_equality/AnySpec.js +0 -84
  33. data/lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js +0 -76
  34. data/lib/jasmine-core/spec/core/asymmetric_equality/ArrayContainingSpec.js +0 -52
  35. data/lib/jasmine-core/spec/core/asymmetric_equality/ArrayWithExactContentsSpec.js +0 -47
  36. data/lib/jasmine-core/spec/core/asymmetric_equality/ObjectContainingSpec.js +0 -102
  37. data/lib/jasmine-core/spec/core/asymmetric_equality/StringMatchingSpec.js +0 -27
  38. data/lib/jasmine-core/spec/core/formatErrorMsgSpec.js +0 -13
  39. data/lib/jasmine-core/spec/core/integration/CustomMatchersSpec.js +0 -199
  40. data/lib/jasmine-core/spec/core/integration/EnvSpec.js +0 -2007
  41. data/lib/jasmine-core/spec/core/integration/SpecRunningSpec.js +0 -950
  42. data/lib/jasmine-core/spec/core/matchers/DiffBuilderSpec.js +0 -47
  43. data/lib/jasmine-core/spec/core/matchers/NullDiffBuilderSpec.js +0 -13
  44. data/lib/jasmine-core/spec/core/matchers/ObjectPathSpec.js +0 -43
  45. data/lib/jasmine-core/spec/core/matchers/matchersUtilSpec.js +0 -658
  46. data/lib/jasmine-core/spec/core/matchers/nothingSpec.js +0 -8
  47. data/lib/jasmine-core/spec/core/matchers/toBeCloseToSpec.js +0 -93
  48. data/lib/jasmine-core/spec/core/matchers/toBeDefinedSpec.js +0 -18
  49. data/lib/jasmine-core/spec/core/matchers/toBeFalsySpec.js +0 -38
  50. data/lib/jasmine-core/spec/core/matchers/toBeGreaterThanOrEqualSpec.js +0 -29
  51. data/lib/jasmine-core/spec/core/matchers/toBeGreaterThanSpec.js +0 -20
  52. data/lib/jasmine-core/spec/core/matchers/toBeLessThanOrEqualSpec.js +0 -29
  53. data/lib/jasmine-core/spec/core/matchers/toBeLessThanSpec.js +0 -20
  54. data/lib/jasmine-core/spec/core/matchers/toBeNaNSpec.js +0 -37
  55. data/lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js +0 -31
  56. data/lib/jasmine-core/spec/core/matchers/toBeNullSpec.js +0 -17
  57. data/lib/jasmine-core/spec/core/matchers/toBePositiveInfinitySpec.js +0 -31
  58. data/lib/jasmine-core/spec/core/matchers/toBeSpec.js +0 -17
  59. data/lib/jasmine-core/spec/core/matchers/toBeTruthySpec.js +0 -38
  60. data/lib/jasmine-core/spec/core/matchers/toBeUndefinedSpec.js +0 -18
  61. data/lib/jasmine-core/spec/core/matchers/toContainSpec.js +0 -26
  62. data/lib/jasmine-core/spec/core/matchers/toEqualSpec.js +0 -804
  63. data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledBeforeSpec.js +0 -99
  64. data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledSpec.js +0 -47
  65. data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledTimesSpec.js +0 -86
  66. data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledWithSpec.js +0 -67
  67. data/lib/jasmine-core/spec/core/matchers/toMatchSpec.js +0 -43
  68. data/lib/jasmine-core/spec/core/matchers/toThrowErrorSpec.js +0 -315
  69. data/lib/jasmine-core/spec/core/matchers/toThrowSpec.js +0 -100
  70. data/lib/jasmine-core/spec/helpers/BrowserFlags.js +0 -27
  71. data/lib/jasmine-core/spec/helpers/asyncAwait.js +0 -27
  72. data/lib/jasmine-core/spec/helpers/checkForMap.js +0 -37
  73. data/lib/jasmine-core/spec/helpers/checkForSet.js +0 -41
  74. data/lib/jasmine-core/spec/helpers/checkForSymbol.js +0 -28
  75. data/lib/jasmine-core/spec/helpers/checkForTypedArrays.js +0 -20
  76. data/lib/jasmine-core/spec/helpers/defineJasmineUnderTest.js +0 -7
  77. data/lib/jasmine-core/spec/helpers/nodeDefineJasmineUnderTest.js +0 -33
  78. data/lib/jasmine-core/spec/html/HtmlReporterSpec.js +0 -982
  79. data/lib/jasmine-core/spec/html/HtmlSpecFilterSpec.js +0 -18
  80. data/lib/jasmine-core/spec/html/MatchersHtmlSpec.js +0 -37
  81. data/lib/jasmine-core/spec/html/PrettyPrintHtmlSpec.js +0 -15
  82. data/lib/jasmine-core/spec/html/QueryStringSpec.js +0 -72
  83. data/lib/jasmine-core/spec/html/ResultsNodeSpec.js +0 -62
  84. data/lib/jasmine-core/spec/html/SpyRegistryHtmlSpec.js +0 -34
  85. data/lib/jasmine-core/spec/npmPackage/npmPackageSpec.js +0 -101
  86. data/lib/jasmine-core/spec/performance/large_object_test.js +0 -36
  87. data/lib/jasmine-core/spec/performance/performance_test.js +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52b633d51b123d4eb0ad4d72b0930a4731a51785
4
- data.tar.gz: c88fb95def076fca0154fe95fb3ad4228387b045
3
+ metadata.gz: c49e107a0140926c343613207940446f285e816a
4
+ data.tar.gz: d239460f82af876a16dbe9d3b6d7d05d9374e7c0
5
5
  SHA512:
6
- metadata.gz: 1db908358f4e995855d55c4c58f53829e8eaf7404b00210df81df8fecf8633e7249bbdd9a2a95da87b29b530ef32a828cbcc347f8aaedb9f055b9b85ce2a98d5
7
- data.tar.gz: 65c2fe06a9921ce67d5eb03f27f48992868fa375e480e5c6a96f8570f3f34c867986f71bab477f5e0e52dbbddd453aba11ad7506af066c99131ca3baaf271fc0
6
+ metadata.gz: 067bf31fbd4f588ac838644cd072e59c1ff5a772da8ec74db8a4849a58499c889c62524d519465c98c88ad5f813950b085c8562a82c50b2d1e2383e386302a34
7
+ data.tar.gz: '014690c428593e0e697fece07e82908469dfb84a2844e91f107a3cc2fd411dbf9e363fb5b6f5bc9a535056debc14cc4ae632b2bf40c13a17455611beb9fdf2a7'
@@ -88,7 +88,8 @@ jasmineRequire.HtmlReporter = function(j$) {
88
88
  results = [],
89
89
  htmlReporterMain,
90
90
  symbols,
91
- failedSuites = [];
91
+ failedSuites = [],
92
+ deprecationWarnings = [];
92
93
 
93
94
  this.initialize = function() {
94
95
  clearPrior();
@@ -126,6 +127,7 @@ jasmineRequire.HtmlReporter = function(j$) {
126
127
  }
127
128
 
128
129
  stateBuilder.suiteDone(result);
130
+ addDeprecationWarnings(result);
129
131
  };
130
132
 
131
133
  this.specStarted = function(result) {
@@ -169,6 +171,8 @@ jasmineRequire.HtmlReporter = function(j$) {
169
171
 
170
172
  failures.push(failure);
171
173
  }
174
+
175
+ addDeprecationWarnings(result);
172
176
  };
173
177
 
174
178
  this.jasmineDone = function(doneResult) {
@@ -278,6 +282,14 @@ jasmineRequire.HtmlReporter = function(j$) {
278
282
  alert.appendChild(createDom('span', {className: errorBarClassName}, errorBarMessagePrefix + failure.message));
279
283
  }
280
284
 
285
+ addDeprecationWarnings(doneResult);
286
+
287
+ var warningBarClassName = 'jasmine-bar jasmine-warning';
288
+ for(i = 0; i < deprecationWarnings.length; i++) {
289
+ var warning = deprecationWarnings[i];
290
+ alert.appendChild(createDom('span', {className: warningBarClassName}, 'DEPRECATION: ' + warning));
291
+ }
292
+
281
293
  var results = find('.jasmine-results');
282
294
  results.appendChild(summary);
283
295
 
@@ -352,6 +364,17 @@ jasmineRequire.HtmlReporter = function(j$) {
352
364
 
353
365
  return this;
354
366
 
367
+ function addDeprecationWarnings(result) {
368
+ if (result && result.deprecationWarnings) {
369
+ for(var i = 0; i < result.deprecationWarnings.length; i++) {
370
+ var warning = result.deprecationWarnings[i].message;
371
+ if (!j$.util.arrayContains(warning)) {
372
+ deprecationWarnings.push(warning);
373
+ }
374
+ }
375
+ }
376
+ }
377
+
355
378
  function find(selector) {
356
379
  return getContainer().querySelector('.jasmine_html-reporter ' + selector);
357
380
  }
@@ -33,6 +33,7 @@ body { overflow-y: scroll; }
33
33
  .jasmine_html-reporter .jasmine-bar.jasmine-passed { background-color: #007069; }
34
34
  .jasmine_html-reporter .jasmine-bar.jasmine-skipped { background-color: #bababa; }
35
35
  .jasmine_html-reporter .jasmine-bar.jasmine-errored { background-color: #ca3a11; }
36
+ .jasmine_html-reporter .jasmine-bar.jasmine-warning { background-color: #ba9d37; color: #333; }
36
37
  .jasmine_html-reporter .jasmine-bar.jasmine-menu { background-color: #fff; color: #aaa; }
37
38
  .jasmine_html-reporter .jasmine-bar.jasmine-menu a { color: #333; }
38
39
  .jasmine_html-reporter .jasmine-bar a { color: white; }
@@ -505,6 +505,7 @@ getJasmineRequireObj().Spec = function(j$) {
505
505
  * @property {String} fullName - The full description including all ancestors of this spec.
506
506
  * @property {Expectation[]} failedExpectations - The list of expectations that failed during execution of this spec.
507
507
  * @property {Expectation[]} passedExpectations - The list of expectations that passed during execution of this spec.
508
+ * @property {Expectation[]} deprecationWarnings - The list of deprecation warnings that occurred during execution this spec.
508
509
  * @property {String} pendingReason - If the spec is {@link pending}, this will be the reason.
509
510
  * @property {String} status - Once the spec has completed, this string represents the pass/fail status of this spec.
510
511
  */
@@ -514,6 +515,7 @@ getJasmineRequireObj().Spec = function(j$) {
514
515
  fullName: this.getFullName(),
515
516
  failedExpectations: [],
516
517
  passedExpectations: [],
518
+ deprecationWarnings: [],
517
519
  pendingReason: ''
518
520
  };
519
521
  }
@@ -629,6 +631,10 @@ getJasmineRequireObj().Spec = function(j$) {
629
631
  return this.getSpecName(this);
630
632
  };
631
633
 
634
+ Spec.prototype.addDeprecationWarning = function(msg) {
635
+ this.result.deprecationWarnings.push(this.expectationResultFactory({ message: msg }));
636
+ };
637
+
632
638
  var extractCustomPendingMessage = function(e) {
633
639
  var fullMessage = e.toString(),
634
640
  boilerplateStart = fullMessage.indexOf(Spec.pendingSpecExceptionMessage),
@@ -710,6 +716,8 @@ getJasmineRequireObj().Env = function(j$) {
710
716
  var self = this;
711
717
  var global = options.global || j$.getGlobal();
712
718
 
719
+ var hasExecuted = false;
720
+
713
721
  var totalSpecsDefined = 0;
714
722
 
715
723
  var catchExceptions = true;
@@ -896,6 +904,9 @@ getJasmineRequireObj().Env = function(j$) {
896
904
  // TODO: fix this naming, and here's where the value comes in
897
905
  this.catchExceptions = function(value) {
898
906
  catchExceptions = !!value;
907
+ if (!catchExceptions) {
908
+ this.deprecated('The catchExceptions option is deprecated and will be replaced with stopOnSpecFailure in Jasmine 3.0');
909
+ }
899
910
  return catchExceptions;
900
911
  };
901
912
 
@@ -933,6 +944,14 @@ getJasmineRequireObj().Env = function(j$) {
933
944
  return seed;
934
945
  };
935
946
 
947
+ this.deprecated = function(msg) {
948
+ var runnable = currentRunnable() || topSuite;
949
+ runnable.addDeprecationWarning(msg);
950
+ if(typeof console !== 'undefined' && typeof console.warn !== 'undefined') {
951
+ console.error('DEPRECATION: ' + msg);
952
+ }
953
+ };
954
+
936
955
  var queueRunnerFactory = function(options) {
937
956
  options.catchException = catchException;
938
957
  options.clearStack = options.clearStack || clearStack;
@@ -940,6 +959,7 @@ getJasmineRequireObj().Env = function(j$) {
940
959
  options.fail = self.fail;
941
960
  options.globalErrors = globalErrors;
942
961
  options.completeOnFirstError = throwOnExpectationFailure && options.isLeaf;
962
+ options.deprecated = self.deprecated;
943
963
 
944
964
  new j$.QueueRunner(options).execute();
945
965
  };
@@ -959,6 +979,12 @@ getJasmineRequireObj().Env = function(j$) {
959
979
  };
960
980
 
961
981
  this.execute = function(runnablesToRun) {
982
+ if (hasExecuted) {
983
+ this.deprecated('Executing the same Jasmine multiple times will no longer work in Jasmine 3.0');
984
+ }
985
+
986
+ hasExecuted = true;
987
+
962
988
  if(!runnablesToRun) {
963
989
  if (focusedRunnables.length) {
964
990
  runnablesToRun = focusedRunnables;
@@ -1025,10 +1051,12 @@ getJasmineRequireObj().Env = function(j$) {
1025
1051
  * @typedef JasmineDoneInfo
1026
1052
  * @property {Order} order - Information about the ordering (random or not) of this execution of the suite.
1027
1053
  * @property {Expectation[]} failedExpectations - List of expectations that failed in an {@link afterAll} at the global level.
1054
+ * @property {Expectation[]} deprecationWarnings - List of deprecation warnings that occurred at the global level.
1028
1055
  */
1029
1056
  reporter.jasmineDone({
1030
1057
  order: order,
1031
- failedExpectations: topSuite.result.failedExpectations
1058
+ failedExpectations: topSuite.result.failedExpectations,
1059
+ deprecationWarnings: topSuite.result.deprecationWarnings
1032
1060
  });
1033
1061
  });
1034
1062
  };
@@ -1130,6 +1158,7 @@ getJasmineRequireObj().Env = function(j$) {
1130
1158
  var focusedRunnables = [];
1131
1159
 
1132
1160
  this.fdescribe = function(description, specDefinitions) {
1161
+ this.deprecated('fit and fdescribe will cause your suite to report an \'incomplete\' status in Jasmine 3.0');
1133
1162
  ensureIsNotNested('fdescribe');
1134
1163
  ensureIsFunction(specDefinitions, 'fdescribe');
1135
1164
  var suite = suiteFactory(description);
@@ -1255,6 +1284,7 @@ getJasmineRequireObj().Env = function(j$) {
1255
1284
  };
1256
1285
 
1257
1286
  this.fit = function(description, fn, timeout){
1287
+ this.deprecated('fit and fdescribe will cause your suite to report an \'incomplete\' status in Jasmine 3.0');
1258
1288
  ensureIsNotNested('fit');
1259
1289
  ensureIsFunctionOrAsync(fn, 'fit');
1260
1290
  var spec = specFactory(description, fn, currentDeclarationSuite, timeout);
@@ -1510,6 +1540,9 @@ getJasmineRequireObj().Any = function(j$) {
1510
1540
  }
1511
1541
 
1512
1542
  if (this.expectedObject == Object) {
1543
+ if (other === null) {
1544
+ j$.getEnv().deprecated('jasmine.Any(Object) will no longer match null in Jasmine 3.0');
1545
+ }
1513
1546
  return typeof other == 'object';
1514
1547
  }
1515
1548
 
@@ -2193,6 +2226,7 @@ getJasmineRequireObj().DelayedFunctionScheduler = function(j$) {
2193
2226
  }
2194
2227
 
2195
2228
  do {
2229
+ deletedKeys = [];
2196
2230
  var newCurrentTime = scheduledLookup.shift();
2197
2231
  tickDate(newCurrentTime - currentTime);
2198
2232
 
@@ -2215,7 +2249,6 @@ getJasmineRequireObj().DelayedFunctionScheduler = function(j$) {
2215
2249
  }
2216
2250
  funcToRun.funcToCall.apply(null, funcToRun.params || []);
2217
2251
  });
2218
- deletedKeys = [];
2219
2252
  } while (scheduledLookup.length > 0 &&
2220
2253
  // checking first if we're out of time prevents setTimeout(0)
2221
2254
  // scheduled in a funcToRun from forcing an extra iteration
@@ -4320,7 +4353,7 @@ getJasmineRequireObj().QueueRunner = function(j$) {
4320
4353
  return function() {
4321
4354
  if (!called) {
4322
4355
  called = true;
4323
- fn();
4356
+ fn.apply(null, arguments);
4324
4357
  }
4325
4358
  return null;
4326
4359
  };
@@ -4339,6 +4372,7 @@ getJasmineRequireObj().QueueRunner = function(j$) {
4339
4372
  this.fail = attrs.fail || function() {};
4340
4373
  this.globalErrors = attrs.globalErrors || { pushListener: function() {}, popListener: function() {} };
4341
4374
  this.completeOnFirstError = !!attrs.completeOnFirstError;
4375
+ this.deprecated = attrs.deprecated;
4342
4376
  }
4343
4377
 
4344
4378
  QueueRunner.prototype.execute = function() {
@@ -4398,9 +4432,13 @@ getJasmineRequireObj().QueueRunner = function(j$) {
4398
4432
  clearTimeout(timeoutId);
4399
4433
  self.globalErrors.popListener(handleError);
4400
4434
  }),
4401
- next = once(function () {
4435
+ next = once(function (err) {
4402
4436
  cleanup();
4403
4437
 
4438
+ if (err instanceof Error) {
4439
+ self.deprecated('done callback received an Error object. Jasmine 3.0 will treat this as a failure');
4440
+ }
4441
+
4404
4442
  function runNext() {
4405
4443
  if (self.completeOnFirstError && errored) {
4406
4444
  self.skipToCleanup(iterativeIndex);
@@ -5147,13 +5185,15 @@ getJasmineRequireObj().Suite = function(j$) {
5147
5185
  * @property {String} description - The description text passed to the {@link describe} that made this suite.
5148
5186
  * @property {String} fullName - The full description including all ancestors of this suite.
5149
5187
  * @property {Expectation[]} failedExpectations - The list of expectations that failed in an {@link afterAll} for this suite.
5188
+ * @property {Expectation[]} deprecationWarnings - The list of deprecation warnings that occurred on this suite.
5150
5189
  * @property {String} status - Once the suite has completed, this string represents the pass/fail status of this suite.
5151
5190
  */
5152
5191
  this.result = {
5153
5192
  id: this.id,
5154
5193
  description: this.description,
5155
5194
  fullName: this.getFullName(),
5156
- failedExpectations: []
5195
+ failedExpectations: [],
5196
+ deprecationWarnings: []
5157
5197
  };
5158
5198
  }
5159
5199
 
@@ -5273,6 +5313,10 @@ getJasmineRequireObj().Suite = function(j$) {
5273
5313
  }
5274
5314
  };
5275
5315
 
5316
+ Suite.prototype.addDeprecationWarning = function(msg) {
5317
+ this.result.deprecationWarnings.push(this.expectationResultFactory({ message: msg }));
5318
+ };
5319
+
5276
5320
  function isAfterAll(children) {
5277
5321
  return children && children[0].result.status;
5278
5322
  }
@@ -5538,5 +5582,5 @@ getJasmineRequireObj().UserContext = function(j$) {
5538
5582
  };
5539
5583
 
5540
5584
  getJasmineRequireObj().version = function() {
5541
- return '2.9.0';
5585
+ return '2.99.0';
5542
5586
  };
@@ -4,6 +4,6 @@
4
4
  #
5
5
  module Jasmine
6
6
  module Core
7
- VERSION = "2.9.0"
7
+ VERSION = "2.99.2"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jasmine-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.99.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Van Hove
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-18 00:00:00.000000000 Z
11
+ date: 2018-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -94,87 +94,6 @@ files:
94
94
  - "./lib/jasmine-core/jasmine.js"
95
95
  - "./lib/jasmine-core/json2.js"
96
96
  - "./lib/jasmine-core/node_boot.js"
97
- - "./lib/jasmine-core/spec/console/ConsoleReporterSpec.js"
98
- - "./lib/jasmine-core/spec/core/CallTrackerSpec.js"
99
- - "./lib/jasmine-core/spec/core/ClearStackSpec.js"
100
- - "./lib/jasmine-core/spec/core/ClockSpec.js"
101
- - "./lib/jasmine-core/spec/core/DelayedFunctionSchedulerSpec.js"
102
- - "./lib/jasmine-core/spec/core/EnvSpec.js"
103
- - "./lib/jasmine-core/spec/core/ExceptionFormatterSpec.js"
104
- - "./lib/jasmine-core/spec/core/ExceptionsSpec.js"
105
- - "./lib/jasmine-core/spec/core/ExpectationResultSpec.js"
106
- - "./lib/jasmine-core/spec/core/ExpectationSpec.js"
107
- - "./lib/jasmine-core/spec/core/GlobalErrorsSpec.js"
108
- - "./lib/jasmine-core/spec/core/JsApiReporterSpec.js"
109
- - "./lib/jasmine-core/spec/core/MockDateSpec.js"
110
- - "./lib/jasmine-core/spec/core/PrettyPrintSpec.js"
111
- - "./lib/jasmine-core/spec/core/QueueRunnerSpec.js"
112
- - "./lib/jasmine-core/spec/core/ReportDispatcherSpec.js"
113
- - "./lib/jasmine-core/spec/core/SpecSpec.js"
114
- - "./lib/jasmine-core/spec/core/SpyRegistrySpec.js"
115
- - "./lib/jasmine-core/spec/core/SpySpec.js"
116
- - "./lib/jasmine-core/spec/core/SpyStrategySpec.js"
117
- - "./lib/jasmine-core/spec/core/SuiteSpec.js"
118
- - "./lib/jasmine-core/spec/core/TimerSpec.js"
119
- - "./lib/jasmine-core/spec/core/TreeProcessorSpec.js"
120
- - "./lib/jasmine-core/spec/core/UserContextSpec.js"
121
- - "./lib/jasmine-core/spec/core/UtilSpec.js"
122
- - "./lib/jasmine-core/spec/core/asymmetric_equality/AnySpec.js"
123
- - "./lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js"
124
- - "./lib/jasmine-core/spec/core/asymmetric_equality/ArrayContainingSpec.js"
125
- - "./lib/jasmine-core/spec/core/asymmetric_equality/ArrayWithExactContentsSpec.js"
126
- - "./lib/jasmine-core/spec/core/asymmetric_equality/ObjectContainingSpec.js"
127
- - "./lib/jasmine-core/spec/core/asymmetric_equality/StringMatchingSpec.js"
128
- - "./lib/jasmine-core/spec/core/formatErrorMsgSpec.js"
129
- - "./lib/jasmine-core/spec/core/integration/CustomMatchersSpec.js"
130
- - "./lib/jasmine-core/spec/core/integration/EnvSpec.js"
131
- - "./lib/jasmine-core/spec/core/integration/SpecRunningSpec.js"
132
- - "./lib/jasmine-core/spec/core/matchers/DiffBuilderSpec.js"
133
- - "./lib/jasmine-core/spec/core/matchers/NullDiffBuilderSpec.js"
134
- - "./lib/jasmine-core/spec/core/matchers/ObjectPathSpec.js"
135
- - "./lib/jasmine-core/spec/core/matchers/matchersUtilSpec.js"
136
- - "./lib/jasmine-core/spec/core/matchers/nothingSpec.js"
137
- - "./lib/jasmine-core/spec/core/matchers/toBeCloseToSpec.js"
138
- - "./lib/jasmine-core/spec/core/matchers/toBeDefinedSpec.js"
139
- - "./lib/jasmine-core/spec/core/matchers/toBeFalsySpec.js"
140
- - "./lib/jasmine-core/spec/core/matchers/toBeGreaterThanOrEqualSpec.js"
141
- - "./lib/jasmine-core/spec/core/matchers/toBeGreaterThanSpec.js"
142
- - "./lib/jasmine-core/spec/core/matchers/toBeLessThanOrEqualSpec.js"
143
- - "./lib/jasmine-core/spec/core/matchers/toBeLessThanSpec.js"
144
- - "./lib/jasmine-core/spec/core/matchers/toBeNaNSpec.js"
145
- - "./lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js"
146
- - "./lib/jasmine-core/spec/core/matchers/toBeNullSpec.js"
147
- - "./lib/jasmine-core/spec/core/matchers/toBePositiveInfinitySpec.js"
148
- - "./lib/jasmine-core/spec/core/matchers/toBeSpec.js"
149
- - "./lib/jasmine-core/spec/core/matchers/toBeTruthySpec.js"
150
- - "./lib/jasmine-core/spec/core/matchers/toBeUndefinedSpec.js"
151
- - "./lib/jasmine-core/spec/core/matchers/toContainSpec.js"
152
- - "./lib/jasmine-core/spec/core/matchers/toEqualSpec.js"
153
- - "./lib/jasmine-core/spec/core/matchers/toHaveBeenCalledBeforeSpec.js"
154
- - "./lib/jasmine-core/spec/core/matchers/toHaveBeenCalledSpec.js"
155
- - "./lib/jasmine-core/spec/core/matchers/toHaveBeenCalledTimesSpec.js"
156
- - "./lib/jasmine-core/spec/core/matchers/toHaveBeenCalledWithSpec.js"
157
- - "./lib/jasmine-core/spec/core/matchers/toMatchSpec.js"
158
- - "./lib/jasmine-core/spec/core/matchers/toThrowErrorSpec.js"
159
- - "./lib/jasmine-core/spec/core/matchers/toThrowSpec.js"
160
- - "./lib/jasmine-core/spec/helpers/BrowserFlags.js"
161
- - "./lib/jasmine-core/spec/helpers/asyncAwait.js"
162
- - "./lib/jasmine-core/spec/helpers/checkForMap.js"
163
- - "./lib/jasmine-core/spec/helpers/checkForSet.js"
164
- - "./lib/jasmine-core/spec/helpers/checkForSymbol.js"
165
- - "./lib/jasmine-core/spec/helpers/checkForTypedArrays.js"
166
- - "./lib/jasmine-core/spec/helpers/defineJasmineUnderTest.js"
167
- - "./lib/jasmine-core/spec/helpers/nodeDefineJasmineUnderTest.js"
168
- - "./lib/jasmine-core/spec/html/HtmlReporterSpec.js"
169
- - "./lib/jasmine-core/spec/html/HtmlSpecFilterSpec.js"
170
- - "./lib/jasmine-core/spec/html/MatchersHtmlSpec.js"
171
- - "./lib/jasmine-core/spec/html/PrettyPrintHtmlSpec.js"
172
- - "./lib/jasmine-core/spec/html/QueryStringSpec.js"
173
- - "./lib/jasmine-core/spec/html/ResultsNodeSpec.js"
174
- - "./lib/jasmine-core/spec/html/SpyRegistryHtmlSpec.js"
175
- - "./lib/jasmine-core/spec/npmPackage/npmPackageSpec.js"
176
- - "./lib/jasmine-core/spec/performance/large_object_test.js"
177
- - "./lib/jasmine-core/spec/performance/performance_test.js"
178
97
  - "./lib/jasmine-core/version.rb"
179
98
  homepage: http://jasmine.github.io
180
99
  licenses:
@@ -196,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
115
  version: '0'
197
116
  requirements: []
198
117
  rubyforge_project: jasmine-core
199
- rubygems_version: 2.4.5.1
118
+ rubygems_version: 2.6.11
200
119
  signing_key:
201
120
  specification_version: 4
202
121
  summary: JavaScript BDD framework
@@ -1,270 +0,0 @@
1
- describe("ConsoleReporter", function() {
2
- var out;
3
-
4
- beforeEach(function() {
5
- out = (function() {
6
- var output = "";
7
- return {
8
- print: function(str) {
9
- output += str;
10
- },
11
- getOutput: function() {
12
- return output.replace('ConsoleReporter is deprecated and will be removed in a future version.', '');
13
- },
14
- clear: function() {
15
- output = "";
16
- }
17
- };
18
- }());
19
- });
20
-
21
- it("reports that the suite has started to the console", function() {
22
- var reporter = new jasmineUnderTest.ConsoleReporter({
23
- print: out.print
24
- });
25
-
26
- reporter.jasmineStarted();
27
-
28
- expect(out.getOutput()).toEqual("Started\n");
29
- });
30
-
31
- it("starts the provided timer when jasmine starts", function() {
32
- var timerSpy = jasmine.createSpyObj('timer', ['start']),
33
- reporter = new jasmineUnderTest.ConsoleReporter({
34
- print: out.print,
35
- timer: timerSpy
36
- });
37
-
38
- reporter.jasmineStarted();
39
-
40
- expect(timerSpy.start).toHaveBeenCalled();
41
- });
42
-
43
- it("reports a passing spec as a dot", function() {
44
- var reporter = new jasmineUnderTest.ConsoleReporter({
45
- print: out.print
46
- });
47
-
48
- reporter.specDone({status: "passed"});
49
-
50
- expect(out.getOutput()).toEqual(".");
51
- });
52
-
53
- it("does not report a disabled spec", function() {
54
- var reporter = new jasmineUnderTest.ConsoleReporter({
55
- print: out.print
56
- });
57
-
58
- reporter.specDone({status: "disabled"});
59
-
60
- expect(out.getOutput()).toEqual("");
61
- });
62
-
63
- it("reports a failing spec as an 'F'", function() {
64
- var reporter = new jasmineUnderTest.ConsoleReporter({
65
- print: out.print
66
- });
67
-
68
- reporter.specDone({status: "failed"});
69
-
70
- expect(out.getOutput()).toEqual("F");
71
- });
72
-
73
- it("reports a pending spec as a '*'", function() {
74
- var reporter = new jasmineUnderTest.ConsoleReporter({
75
- print: out.print
76
- });
77
-
78
- reporter.specDone({status: "pending"});
79
-
80
- expect(out.getOutput()).toEqual("*");
81
- });
82
-
83
- it("alerts user if there are no specs", function(){
84
- var reporter = new jasmineUnderTest.ConsoleReporter({
85
- print: out.print
86
- });
87
-
88
- reporter.jasmineStarted();
89
- out.clear();
90
- reporter.jasmineDone();
91
-
92
- expect(out.getOutput()).toMatch(/No specs found/);
93
- });
94
-
95
- it("reports a summary when done (singular spec and time)", function() {
96
- var timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
97
- reporter = new jasmineUnderTest.ConsoleReporter({
98
- print: out.print,
99
- timer: timerSpy
100
- });
101
-
102
- reporter.jasmineStarted();
103
- reporter.specDone({status: "passed"});
104
-
105
- timerSpy.elapsed.and.returnValue(1000);
106
-
107
- out.clear();
108
- reporter.jasmineDone();
109
-
110
- expect(out.getOutput()).toMatch(/1 spec, 0 failures/);
111
- expect(out.getOutput()).not.toMatch(/0 pending specs/);
112
- expect(out.getOutput()).toMatch("Finished in 1 second\n");
113
- });
114
-
115
- it("reports a summary when done (pluralized specs and seconds)", function() {
116
- var timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
117
- reporter = new jasmineUnderTest.ConsoleReporter({
118
- print: out.print,
119
- timer: timerSpy
120
- });
121
-
122
- reporter.jasmineStarted();
123
- reporter.specDone({status: "passed"});
124
- reporter.specDone({status: "pending"});
125
- reporter.specDone({
126
- status: "failed",
127
- description: "with a failing spec",
128
- fullName: "A suite with a failing spec",
129
- failedExpectations: [
130
- {
131
- passed: false,
132
- message: "Expected true to be false.",
133
- expected: false,
134
- actual: true,
135
- stack: "foo\nbar\nbaz"
136
- }
137
- ]
138
- });
139
-
140
- out.clear();
141
-
142
- timerSpy.elapsed.and.returnValue(100);
143
-
144
- reporter.jasmineDone();
145
-
146
- expect(out.getOutput()).toMatch(/3 specs, 1 failure, 1 pending spec/);
147
- expect(out.getOutput()).toMatch("Finished in 0.1 seconds\n");
148
- });
149
-
150
- it("reports a summary when done that includes stack traces for a failing suite", function() {
151
- var reporter = new jasmineUnderTest.ConsoleReporter({
152
- print: out.print
153
- });
154
-
155
- reporter.jasmineStarted();
156
- reporter.specDone({status: "passed"});
157
- reporter.specDone({
158
- status: "failed",
159
- description: "with a failing spec",
160
- fullName: "A suite with a failing spec",
161
- failedExpectations: [
162
- {
163
- passed: false,
164
- message: "Expected true to be false.",
165
- expected: false,
166
- actual: true,
167
- stack: "foo bar baz"
168
- }
169
- ]
170
- });
171
-
172
- out.clear();
173
-
174
- reporter.jasmineDone();
175
-
176
- expect(out.getOutput()).toMatch(/true to be false/);
177
- expect(out.getOutput()).toMatch(/foo bar baz/);
178
- });
179
-
180
- describe('onComplete callback', function(){
181
- var onComplete, reporter;
182
-
183
- beforeEach(function() {
184
- onComplete = jasmine.createSpy('onComplete');
185
- reporter = new jasmineUnderTest.ConsoleReporter({
186
- print: out.print,
187
- onComplete: onComplete
188
- });
189
- reporter.jasmineStarted();
190
- });
191
-
192
- it("is called when the suite is done", function() {
193
- reporter.jasmineDone();
194
- expect(onComplete).toHaveBeenCalledWith(true);
195
- });
196
-
197
- it('calls it with false if there are spec failures', function() {
198
- reporter.specDone({status: "failed", failedExpectations: []});
199
- reporter.jasmineDone();
200
- expect(onComplete).toHaveBeenCalledWith(false);
201
- });
202
-
203
- it('calls it with false if there are suite failures', function() {
204
- reporter.specDone({status: "passed"});
205
- reporter.suiteDone({failedExpectations: [{ message: 'bananas' }] });
206
- reporter.jasmineDone();
207
- expect(onComplete).toHaveBeenCalledWith(false);
208
- });
209
- });
210
-
211
- describe("with color", function() {
212
- it("reports that the suite has started to the console", function() {
213
- var reporter = new jasmineUnderTest.ConsoleReporter({
214
- print: out.print,
215
- showColors: true
216
- });
217
-
218
- reporter.jasmineStarted();
219
-
220
- expect(out.getOutput()).toEqual("Started\n");
221
- });
222
-
223
- it("reports a passing spec as a dot", function() {
224
- var reporter = new jasmineUnderTest.ConsoleReporter({
225
- print: out.print,
226
- showColors: true
227
- });
228
-
229
- reporter.specDone({status: "passed"});
230
-
231
- expect(out.getOutput()).toEqual("\x1B[32m.\x1B[0m");
232
- });
233
-
234
- it("does not report a disabled spec", function() {
235
- var reporter = new jasmineUnderTest.ConsoleReporter({
236
- print: out.print,
237
- showColors: true
238
- });
239
-
240
- reporter.specDone({status: 'disabled'});
241
-
242
- expect(out.getOutput()).toEqual("");
243
- });
244
-
245
- it("reports a failing spec as an 'F'", function() {
246
- var reporter = new jasmineUnderTest.ConsoleReporter({
247
- print: out.print,
248
- showColors: true
249
- });
250
-
251
- reporter.specDone({status: 'failed'});
252
-
253
- expect(out.getOutput()).toEqual("\x1B[31mF\x1B[0m");
254
- });
255
-
256
- it("displays all afterAll exceptions", function() {
257
- var reporter = new jasmineUnderTest.ConsoleReporter({
258
- print: out.print,
259
- showColors: true
260
- });
261
-
262
- reporter.suiteDone({ failedExpectations: [{ message: 'After All Exception' }] });
263
- reporter.suiteDone({ failedExpectations: [{ message: 'Some Other Exception' }] });
264
- reporter.jasmineDone();
265
-
266
- expect(out.getOutput()).toMatch(/After All Exception/);
267
- expect(out.getOutput()).toMatch(/Some Other Exception/);
268
- });
269
- });
270
- });