jasmine-core 2.5.2 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/console/console.js +1 -1
  3. data/lib/jasmine-core/boot/boot.js +4 -1
  4. data/lib/jasmine-core/boot.js +5 -2
  5. data/lib/jasmine-core/jasmine-html.js +19 -1
  6. data/lib/jasmine-core/jasmine.js +2859 -1571
  7. data/lib/jasmine-core/node_boot.js +1 -1
  8. data/lib/jasmine-core/spec/core/ClearStackSpec.js +67 -0
  9. data/lib/jasmine-core/spec/core/EnvSpec.js +100 -10
  10. data/lib/jasmine-core/spec/core/ExpectationSpec.js +52 -7
  11. data/lib/jasmine-core/spec/core/GlobalErrorsSpec.js +94 -0
  12. data/lib/jasmine-core/spec/core/PrettyPrintSpec.js +37 -1
  13. data/lib/jasmine-core/spec/core/QueueRunnerSpec.js +37 -0
  14. data/lib/jasmine-core/spec/core/SpyRegistrySpec.js +183 -0
  15. data/lib/jasmine-core/spec/core/SpySpec.js +44 -2
  16. data/lib/jasmine-core/spec/core/SuiteSpec.js +3 -18
  17. data/lib/jasmine-core/spec/core/UtilSpec.js +71 -0
  18. data/lib/jasmine-core/spec/core/asymmetric_equality/ArrayContainingSpec.js +13 -0
  19. data/lib/jasmine-core/spec/core/asymmetric_equality/ObjectContainingSpec.js +13 -0
  20. data/lib/jasmine-core/spec/core/integration/CustomMatchersSpec.js +47 -0
  21. data/lib/jasmine-core/spec/core/integration/EnvSpec.js +85 -14
  22. data/lib/jasmine-core/spec/core/integration/SpecRunningSpec.js +45 -3
  23. data/lib/jasmine-core/spec/core/matchers/DiffBuilderSpec.js +47 -0
  24. data/lib/jasmine-core/spec/core/matchers/NullDiffBuilderSpec.js +13 -0
  25. data/lib/jasmine-core/spec/core/matchers/ObjectPathSpec.js +43 -0
  26. data/lib/jasmine-core/spec/core/matchers/matchersUtilSpec.js +57 -1
  27. data/lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js +31 -0
  28. data/lib/jasmine-core/spec/core/matchers/toBePositiveInfinitySpec.js +31 -0
  29. data/lib/jasmine-core/spec/core/matchers/toEqualSpec.js +492 -4
  30. data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledBeforeSpec.js +99 -0
  31. data/lib/jasmine-core/spec/core/matchers/toThrowErrorSpec.js +37 -0
  32. data/lib/jasmine-core/spec/helpers/BrowserFlags.js +4 -0
  33. data/lib/jasmine-core/spec/helpers/checkForSet.js +21 -0
  34. data/lib/jasmine-core/spec/html/HtmlReporterSpec.js +58 -0
  35. data/lib/jasmine-core/spec/npmPackage/npmPackageSpec.js +1 -1
  36. data/lib/jasmine-core/version.rb +1 -1
  37. metadata +11 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71429fa9b38c528a62e48585cd3be35b71141be6
4
- data.tar.gz: d2ad921c951ae5a491c4df73ab4a845095958e51
3
+ metadata.gz: 231c928de8539c661809a9e5a9d3a8d31b981cd4
4
+ data.tar.gz: 62c0898fe4858367746ed1fb2f40e37d8bf557bc
5
5
  SHA512:
6
- metadata.gz: f3b14ae8fb70a0389d96d21c6d341a1778e6716d641f0d4c522420892423487687644815506784c4f4ce85e5475066e0b68b5a3b4643291bfe64f5e3412d2074
7
- data.tar.gz: 21a4d63fb89569f3175c4f0dc4be4f208d48acf35f3aca33f41337340dd42bd9d479c761abef3cc979869660994fc115cbf67254c5b88f8941aa4ea126b312ae
6
+ metadata.gz: c36ab7dc0f2853038ad35bfefb1de2fcd07f7c9d9da6ab2c7bd2d953890e04b76e4acd9bc8702cc64af95539801917e2bbd9e98ef08fe9e714322bed46ae2337
7
+ data.tar.gz: 07f82fd21633dd4f0e305688b96b6294822995a29f840a160061bfbbffff2f1fb2a23d915f64c531344ae3033d4d0f1a7ae2f1a784698e552362b90188fa1589
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2008-2016 Pivotal Labs
2
+ Copyright (c) 2008-2017 Pivotal Labs
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining
5
5
  a copy of this software and associated documentation files (the
@@ -49,6 +49,8 @@
49
49
  getWindowLocation: function() { return window.location; }
50
50
  });
51
51
 
52
+ var filterSpecs = !!queryString.getParam("spec");
53
+
52
54
  var catchingExceptions = queryString.getParam("catch");
53
55
  env.catchExceptions(typeof catchingExceptions === "undefined" ? true : catchingExceptions);
54
56
 
@@ -76,7 +78,8 @@
76
78
  getContainer: function() { return document.body; },
77
79
  createElement: function() { return document.createElement.apply(document, arguments); },
78
80
  createTextNode: function() { return document.createTextNode.apply(document, arguments); },
79
- timer: new jasmine.Timer()
81
+ timer: new jasmine.Timer(),
82
+ filterSpecs: filterSpecs
80
83
  });
81
84
 
82
85
  /**
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2008-2016 Pivotal Labs
2
+ Copyright (c) 2008-2017 Pivotal Labs
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining
5
5
  a copy of this software and associated documentation files (the
@@ -71,6 +71,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
71
71
  getWindowLocation: function() { return window.location; }
72
72
  });
73
73
 
74
+ var filterSpecs = !!queryString.getParam("spec");
75
+
74
76
  var catchingExceptions = queryString.getParam("catch");
75
77
  env.catchExceptions(typeof catchingExceptions === "undefined" ? true : catchingExceptions);
76
78
 
@@ -98,7 +100,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
98
100
  getContainer: function() { return document.body; },
99
101
  createElement: function() { return document.createElement.apply(document, arguments); },
100
102
  createTextNode: function() { return document.createTextNode.apply(document, arguments); },
101
- timer: new jasmine.Timer()
103
+ timer: new jasmine.Timer(),
104
+ filterSpecs: filterSpecs
102
105
  });
103
106
 
104
107
  /**
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2008-2016 Pivotal Labs
2
+ Copyright (c) 2008-2017 Pivotal Labs
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining
5
5
  a copy of this software and associated documentation files (the
@@ -43,6 +43,7 @@ jasmineRequire.HtmlReporter = function(j$) {
43
43
  onThrowExpectationsClick = options.onThrowExpectationsClick || function() {},
44
44
  onRandomClick = options.onRandomClick || function() {},
45
45
  addToExistingQueryString = options.addToExistingQueryString || defaultQueryString,
46
+ filterSpecs = options.filterSpecs,
46
47
  timer = options.timer || noopTimer,
47
48
  results = [],
48
49
  specsExecuted = 0,
@@ -263,6 +264,9 @@ jasmineRequire.HtmlReporter = function(j$) {
263
264
  var specListNode;
264
265
  for (var i = 0; i < resultsTree.children.length; i++) {
265
266
  var resultNode = resultsTree.children[i];
267
+ if (filterSpecs && !hasActiveSpec(resultNode)) {
268
+ continue;
269
+ }
266
270
  if (resultNode.type == 'suite') {
267
271
  var suiteListNode = createDom('ul', {className: 'jasmine-suite', id: 'suite-' + resultNode.result.id},
268
272
  createDom('li', {className: 'jasmine-suite-detail'},
@@ -390,6 +394,20 @@ jasmineRequire.HtmlReporter = function(j$) {
390
394
  return (result.failedExpectations.length + result.passedExpectations.length) === 0 &&
391
395
  result.status === 'passed';
392
396
  }
397
+
398
+ function hasActiveSpec(resultNode) {
399
+ if (resultNode.type == 'spec' && resultNode.result.status != 'disabled') {
400
+ return true;
401
+ }
402
+
403
+ if (resultNode.type == 'suite') {
404
+ for (var i = 0, j = resultNode.children.length; i < j; i++) {
405
+ if (hasActiveSpec(resultNode.children[i])) {
406
+ return true;
407
+ }
408
+ }
409
+ }
410
+ }
393
411
  }
394
412
 
395
413
  return HtmlReporter;