jasmine-core 5.12.0 → 6.0.0-alpha.1
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.
- package/README.md +1 -1
- package/lib/jasmine-core/boot0.js +2 -0
- package/lib/jasmine-core/boot1.js +9 -66
- package/lib/jasmine-core/jasmine-html.js +1447 -810
- package/lib/jasmine-core/jasmine.css +22 -0
- package/lib/jasmine-core/jasmine.js +988 -665
- package/lib/jasmine-core.js +42 -15
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Microsoft Edge) as well as Node.
|
|
|
29
29
|
|
|
30
30
|
| Environment | Supported versions |
|
|
31
31
|
|-------------------|----------------------------------|
|
|
32
|
-
| Node |
|
|
32
|
+
| Node | 20, 22, 24 |
|
|
33
33
|
| Safari | 16*, 17* |
|
|
34
34
|
| Chrome | Evergreen |
|
|
35
35
|
| Firefox | Evergreen, 102*, 115*, 128*, 140 |
|
|
@@ -22,6 +22,8 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
|
22
22
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
'use strict';
|
|
26
|
+
|
|
25
27
|
/**
|
|
26
28
|
This file starts the process of "booting" Jasmine. It initializes Jasmine,
|
|
27
29
|
makes its globals available, and creates the env. This file should be loaded
|
|
@@ -22,6 +22,8 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
|
22
22
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
'use strict';
|
|
26
|
+
|
|
25
27
|
/**
|
|
26
28
|
This file finishes 'booting' Jasmine, performing all of the necessary
|
|
27
29
|
initialization before executing the loaded environment and all of a project's
|
|
@@ -37,63 +39,18 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
37
39
|
|
|
38
40
|
(function() {
|
|
39
41
|
const env = jasmine.getEnv();
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* ## Runner Parameters
|
|
43
|
-
*
|
|
44
|
-
* More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface.
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
const queryString = new jasmine.QueryString({
|
|
48
|
-
getWindowLocation: function() {
|
|
49
|
-
return window.location;
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
const filterSpecs = !!queryString.getParam('spec');
|
|
54
|
-
|
|
55
|
-
const config = {
|
|
56
|
-
stopOnSpecFailure: queryString.getParam('stopOnSpecFailure'),
|
|
57
|
-
stopSpecOnExpectationFailure: queryString.getParam(
|
|
58
|
-
'stopSpecOnExpectationFailure'
|
|
59
|
-
),
|
|
60
|
-
hideDisabled: queryString.getParam('hideDisabled')
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const random = queryString.getParam('random');
|
|
64
|
-
|
|
65
|
-
if (random !== undefined && random !== '') {
|
|
66
|
-
config.random = random;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const seed = queryString.getParam('seed');
|
|
70
|
-
if (seed) {
|
|
71
|
-
config.seed = seed;
|
|
72
|
-
}
|
|
42
|
+
const urls = new jasmine.HtmlReporterV2Urls();
|
|
73
43
|
|
|
74
44
|
/**
|
|
75
45
|
* ## Reporters
|
|
76
46
|
* The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any).
|
|
77
47
|
*/
|
|
78
|
-
const htmlReporter = new jasmine.
|
|
79
|
-
env
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
addToExistingQueryString: function(key, value) {
|
|
84
|
-
return queryString.fullStringWithNewParam(key, value);
|
|
85
|
-
},
|
|
86
|
-
getContainer: function() {
|
|
48
|
+
const htmlReporter = new jasmine.HtmlReporterV2({
|
|
49
|
+
env,
|
|
50
|
+
urls,
|
|
51
|
+
getContainer() {
|
|
87
52
|
return document.body;
|
|
88
|
-
}
|
|
89
|
-
createElement: function() {
|
|
90
|
-
return document.createElement.apply(document, arguments);
|
|
91
|
-
},
|
|
92
|
-
createTextNode: function() {
|
|
93
|
-
return document.createTextNode.apply(document, arguments);
|
|
94
|
-
},
|
|
95
|
-
timer: new jasmine.Timer(),
|
|
96
|
-
filterSpecs: filterSpecs
|
|
53
|
+
}
|
|
97
54
|
});
|
|
98
55
|
|
|
99
56
|
/**
|
|
@@ -101,21 +58,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
101
58
|
*/
|
|
102
59
|
env.addReporter(jsApiReporter);
|
|
103
60
|
env.addReporter(htmlReporter);
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Filter which specs will be run by matching the start of the full name against the `spec` query param.
|
|
107
|
-
*/
|
|
108
|
-
const specFilter = new jasmine.HtmlSpecFilter({
|
|
109
|
-
filterString: function() {
|
|
110
|
-
return queryString.getParam('spec');
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
config.specFilter = function(spec) {
|
|
115
|
-
return specFilter.matches(spec.getFullName());
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
env.configure(config);
|
|
61
|
+
env.configure(urls.configFromCurrentUrl());
|
|
119
62
|
|
|
120
63
|
/**
|
|
121
64
|
* ## Execution
|