jasmine-core 6.0.0-alpha.0 → 6.0.0-alpha.2
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 +13 -51
- package/lib/jasmine-core/jasmine-html.js +1652 -845
- package/lib/jasmine-core/jasmine.css +50 -3
- package/lib/jasmine-core/jasmine.js +764 -333
- package/lib/jasmine-core.js +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Microsoft Edge) as well as Node.
|
|
|
30
30
|
| Environment | Supported versions |
|
|
31
31
|
|-------------------|----------------------------------|
|
|
32
32
|
| Node | 20, 22, 24 |
|
|
33
|
-
| Safari | 16*, 17*
|
|
33
|
+
| Safari | 16*, 17*, 26* |
|
|
34
34
|
| Chrome | Evergreen |
|
|
35
35
|
| Firefox | Evergreen, 102*, 115*, 128*, 140 |
|
|
36
36
|
| Edge | Evergreen |
|
|
@@ -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,55 +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
|
-
const queryString = new jasmine.QueryString({
|
|
42
|
-
getWindowLocation: function() {
|
|
43
|
-
return window.location;
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
const config = {
|
|
48
|
-
stopOnSpecFailure: queryString.getParam('stopOnSpecFailure'),
|
|
49
|
-
stopSpecOnExpectationFailure: queryString.getParam(
|
|
50
|
-
'stopSpecOnExpectationFailure'
|
|
51
|
-
),
|
|
52
|
-
hideDisabled: queryString.getParam('hideDisabled')
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const random = queryString.getParam('random');
|
|
56
|
-
|
|
57
|
-
if (random !== undefined && random !== '') {
|
|
58
|
-
config.random = random;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const seed = queryString.getParam('seed');
|
|
62
|
-
if (seed) {
|
|
63
|
-
config.seed = seed;
|
|
64
|
-
}
|
|
42
|
+
const urls = new jasmine.HtmlReporterV2Urls();
|
|
65
43
|
|
|
66
44
|
/**
|
|
67
45
|
* ## Reporters
|
|
68
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).
|
|
69
47
|
*/
|
|
70
|
-
const htmlReporter = new jasmine.
|
|
71
|
-
env
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
addToExistingQueryString: function(key, value) {
|
|
76
|
-
return queryString.fullStringWithNewParam(key, value);
|
|
77
|
-
},
|
|
78
|
-
getContainer: function() {
|
|
48
|
+
const htmlReporter = new jasmine.HtmlReporterV2({
|
|
49
|
+
env,
|
|
50
|
+
urls,
|
|
51
|
+
getContainer() {
|
|
79
52
|
return document.body;
|
|
80
|
-
}
|
|
81
|
-
createElement: function() {
|
|
82
|
-
return document.createElement.apply(document, arguments);
|
|
83
|
-
},
|
|
84
|
-
createTextNode: function() {
|
|
85
|
-
return document.createTextNode.apply(document, arguments);
|
|
86
|
-
},
|
|
87
|
-
timer: new jasmine.Timer(),
|
|
88
|
-
queryString
|
|
53
|
+
}
|
|
89
54
|
});
|
|
90
55
|
|
|
91
56
|
/**
|
|
@@ -93,16 +58,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
93
58
|
*/
|
|
94
59
|
env.addReporter(jsApiReporter);
|
|
95
60
|
env.addReporter(htmlReporter);
|
|
96
|
-
|
|
97
61
|
/**
|
|
98
|
-
*
|
|
62
|
+
* Configures Jasmine based on the current set of query parameters. This
|
|
63
|
+
* supports all parameters set by the HTML reporter as well as
|
|
64
|
+
* spec=partialPath, which filters out specs whose paths don't contain the
|
|
65
|
+
* parameter.
|
|
99
66
|
*/
|
|
100
|
-
|
|
101
|
-
config.specFilter = function(spec) {
|
|
102
|
-
return specFilter.matches(spec);
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
env.configure(config);
|
|
67
|
+
env.configure(urls.configFromCurrentUrl());
|
|
106
68
|
|
|
107
69
|
/**
|
|
108
70
|
* ## Execution
|