jasmine-core 2.5.2 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/console/console.js +1 -1
- data/lib/jasmine-core/boot/boot.js +4 -1
- data/lib/jasmine-core/boot.js +5 -2
- data/lib/jasmine-core/jasmine-html.js +19 -1
- data/lib/jasmine-core/jasmine.js +2859 -1571
- data/lib/jasmine-core/node_boot.js +1 -1
- data/lib/jasmine-core/spec/core/ClearStackSpec.js +67 -0
- data/lib/jasmine-core/spec/core/EnvSpec.js +100 -10
- data/lib/jasmine-core/spec/core/ExpectationSpec.js +52 -7
- data/lib/jasmine-core/spec/core/GlobalErrorsSpec.js +94 -0
- data/lib/jasmine-core/spec/core/PrettyPrintSpec.js +37 -1
- data/lib/jasmine-core/spec/core/QueueRunnerSpec.js +37 -0
- data/lib/jasmine-core/spec/core/SpyRegistrySpec.js +183 -0
- data/lib/jasmine-core/spec/core/SpySpec.js +44 -2
- data/lib/jasmine-core/spec/core/SuiteSpec.js +3 -18
- data/lib/jasmine-core/spec/core/UtilSpec.js +71 -0
- data/lib/jasmine-core/spec/core/asymmetric_equality/ArrayContainingSpec.js +13 -0
- data/lib/jasmine-core/spec/core/asymmetric_equality/ObjectContainingSpec.js +13 -0
- data/lib/jasmine-core/spec/core/integration/CustomMatchersSpec.js +47 -0
- data/lib/jasmine-core/spec/core/integration/EnvSpec.js +85 -14
- data/lib/jasmine-core/spec/core/integration/SpecRunningSpec.js +45 -3
- data/lib/jasmine-core/spec/core/matchers/DiffBuilderSpec.js +47 -0
- data/lib/jasmine-core/spec/core/matchers/NullDiffBuilderSpec.js +13 -0
- data/lib/jasmine-core/spec/core/matchers/ObjectPathSpec.js +43 -0
- data/lib/jasmine-core/spec/core/matchers/matchersUtilSpec.js +57 -1
- data/lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js +31 -0
- data/lib/jasmine-core/spec/core/matchers/toBePositiveInfinitySpec.js +31 -0
- data/lib/jasmine-core/spec/core/matchers/toEqualSpec.js +492 -4
- data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledBeforeSpec.js +99 -0
- data/lib/jasmine-core/spec/core/matchers/toThrowErrorSpec.js +37 -0
- data/lib/jasmine-core/spec/helpers/BrowserFlags.js +4 -0
- data/lib/jasmine-core/spec/helpers/checkForSet.js +21 -0
- data/lib/jasmine-core/spec/html/HtmlReporterSpec.js +58 -0
- data/lib/jasmine-core/spec/npmPackage/npmPackageSpec.js +1 -1
- data/lib/jasmine-core/version.rb +1 -1
- metadata +11 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 231c928de8539c661809a9e5a9d3a8d31b981cd4
|
4
|
+
data.tar.gz: 62c0898fe4858367746ed1fb2f40e37d8bf557bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c36ab7dc0f2853038ad35bfefb1de2fcd07f7c9d9da6ab2c7bd2d953890e04b76e4acd9bc8702cc64af95539801917e2bbd9e98ef08fe9e714322bed46ae2337
|
7
|
+
data.tar.gz: 07f82fd21633dd4f0e305688b96b6294822995a29f840a160061bfbbffff2f1fb2a23d915f64c531344ae3033d4d0f1a7ae2f1a784698e552362b90188fa1589
|
data/lib/console/console.js
CHANGED
@@ -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
|
/**
|
data/lib/jasmine-core/boot.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2008-
|
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-
|
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;
|