jasmine-core 5.0.0-beta.0 → 5.0.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.
@@ -530,14 +530,13 @@ jasmineRequire.HtmlReporter = function(j$) {
530
530
  if (noExpectations(resultNode.result)) {
531
531
  specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription;
532
532
  }
533
- if (
534
- resultNode.result.status === 'pending' &&
535
- resultNode.result.pendingReason !== ''
536
- ) {
537
- specDescription =
538
- specDescription +
539
- ' PENDING WITH MESSAGE: ' +
540
- resultNode.result.pendingReason;
533
+ if (resultNode.result.status === 'pending') {
534
+ if (resultNode.result.pendingReason !== '') {
535
+ specDescription +=
536
+ ' PENDING WITH MESSAGE: ' + resultNode.result.pendingReason;
537
+ } else {
538
+ specDescription += ' PENDING';
539
+ }
541
540
  }
542
541
  specListNode.appendChild(
543
542
  createDom(
@@ -55,9 +55,6 @@ body {
55
55
  position: fixed;
56
56
  right: 100%;
57
57
  }
58
- .jasmine_html-reporter .jasmine-version {
59
- color: #aaa;
60
- }
61
58
  .jasmine_html-reporter .jasmine-banner {
62
59
  margin-top: 14px;
63
60
  }
@@ -169,10 +166,11 @@ body {
169
166
  }
170
167
  .jasmine_html-reporter .jasmine-bar.jasmine-menu {
171
168
  background-color: #fff;
172
- color: #aaa;
169
+ color: #000;
173
170
  }
174
171
  .jasmine_html-reporter .jasmine-bar.jasmine-menu a {
175
- color: #333;
172
+ color: blue;
173
+ text-decoration: underline;
176
174
  }
177
175
  .jasmine_html-reporter .jasmine-bar a {
178
176
  color: white;
@@ -10713,5 +10713,5 @@ getJasmineRequireObj().UserContext = function(j$) {
10713
10713
  };
10714
10714
 
10715
10715
  getJasmineRequireObj().version = function() {
10716
- return '5.0.0-beta.0';
10716
+ return '5.0.0';
10717
10717
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jasmine-core",
3
3
  "license": "MIT",
4
- "version": "5.0.0-beta.0",
4
+ "version": "5.0.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/jasmine/jasmine.git"
@@ -36,16 +36,16 @@
36
36
  "devDependencies": {
37
37
  "eslint": "^8.36.0",
38
38
  "eslint-plugin-compat": "^4.0.0",
39
- "glob": "^9.3.1",
39
+ "glob": "^10.2.3",
40
40
  "grunt": "^1.0.4",
41
41
  "grunt-cli": "^1.3.2",
42
42
  "grunt-contrib-compress": "^2.0.0",
43
43
  "grunt-contrib-concat": "^2.0.0",
44
44
  "grunt-css-url-embed": "^1.11.1",
45
45
  "grunt-sass": "^3.0.2",
46
- "jasmine": "github:jasmine/jasmine-npm#5.0",
46
+ "jasmine": "5.0.0-beta.0",
47
47
  "jasmine-browser-runner": "^1.0.0",
48
- "jsdom": "^21.1.1",
48
+ "jsdom": "^22.0.0",
49
49
  "load-grunt-tasks": "^5.1.0",
50
50
  "prettier": "1.17.1",
51
51
  "sass": "^1.58.3",
@@ -1,64 +0,0 @@
1
- /*
2
- Copyright (c) 2008-2023 Pivotal Labs
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining
5
- a copy of this software and associated documentation files (the
6
- "Software"), to deal in the Software without restriction, including
7
- without limitation the rights to use, copy, modify, merge, publish,
8
- distribute, sublicense, and/or sell copies of the Software, and to
9
- permit persons to whom the Software is furnished to do so, subject to
10
- the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be
13
- included in all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
- */
23
- /**
24
- This file starts the process of "booting" Jasmine. It initializes Jasmine,
25
- makes its globals available, and creates the env. This file should be loaded
26
- after `jasmine.js` and `jasmine_html.js`, but before `boot1.js` or any project
27
- source files or spec files are loaded.
28
- */
29
- (function() {
30
- const jasmineRequire = window.jasmineRequire || require('./jasmine.js');
31
-
32
- /**
33
- * ## Require & Instantiate
34
- *
35
- * Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference.
36
- */
37
- const jasmine = jasmineRequire.core(jasmineRequire),
38
- global = jasmine.getGlobal();
39
- global.jasmine = jasmine;
40
-
41
- /**
42
- * Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference.
43
- */
44
- jasmineRequire.html(jasmine);
45
-
46
- /**
47
- * Create the Jasmine environment. This is used to run all specs in a project.
48
- */
49
- const env = jasmine.getEnv();
50
-
51
- /**
52
- * ## The Global Interface
53
- *
54
- * Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged.
55
- */
56
- const jasmineInterface = jasmineRequire.interface(jasmine, env);
57
-
58
- /**
59
- * Add all of the Jasmine global/public interface to the global scope, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`.
60
- */
61
- for (const property in jasmineInterface) {
62
- global[property] = jasmineInterface[property];
63
- }
64
- })();
@@ -1,132 +0,0 @@
1
- /*
2
- Copyright (c) 2008-2023 Pivotal Labs
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining
5
- a copy of this software and associated documentation files (the
6
- "Software"), to deal in the Software without restriction, including
7
- without limitation the rights to use, copy, modify, merge, publish,
8
- distribute, sublicense, and/or sell copies of the Software, and to
9
- permit persons to whom the Software is furnished to do so, subject to
10
- the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be
13
- included in all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
- */
23
- /**
24
- This file finishes 'booting' Jasmine, performing all of the necessary
25
- initialization before executing the loaded environment and all of a project's
26
- specs. This file should be loaded after `boot0.js` but before any project
27
- source files or spec files are loaded. Thus this file can also be used to
28
- customize Jasmine for a project.
29
-
30
- If a project is using Jasmine via the standalone distribution, this file can
31
- be customized directly. If you only wish to configure the Jasmine env, you
32
- can load another file that calls `jasmine.getEnv().configure({...})`
33
- after `boot0.js` is loaded and before this file is loaded.
34
- */
35
-
36
- (function() {
37
- const env = jasmine.getEnv();
38
-
39
- /**
40
- * ## Runner Parameters
41
- *
42
- * More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface.
43
- */
44
-
45
- const queryString = new jasmine.QueryString({
46
- getWindowLocation: function() {
47
- return window.location;
48
- }
49
- });
50
-
51
- const filterSpecs = !!queryString.getParam('spec');
52
-
53
- const config = {
54
- stopOnSpecFailure: queryString.getParam('stopOnSpecFailure'),
55
- stopSpecOnExpectationFailure: queryString.getParam(
56
- 'stopSpecOnExpectationFailure'
57
- ),
58
- hideDisabled: queryString.getParam('hideDisabled')
59
- };
60
-
61
- const random = queryString.getParam('random');
62
-
63
- if (random !== undefined && random !== '') {
64
- config.random = random;
65
- }
66
-
67
- const seed = queryString.getParam('seed');
68
- if (seed) {
69
- config.seed = seed;
70
- }
71
-
72
- /**
73
- * ## Reporters
74
- * 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).
75
- */
76
- const htmlReporter = new jasmine.HtmlReporter({
77
- env: env,
78
- navigateWithNewParam: function(key, value) {
79
- return queryString.navigateWithNewParam(key, value);
80
- },
81
- addToExistingQueryString: function(key, value) {
82
- return queryString.fullStringWithNewParam(key, value);
83
- },
84
- getContainer: function() {
85
- return document.body;
86
- },
87
- createElement: function() {
88
- return document.createElement.apply(document, arguments);
89
- },
90
- createTextNode: function() {
91
- return document.createTextNode.apply(document, arguments);
92
- },
93
- timer: new jasmine.Timer(),
94
- filterSpecs: filterSpecs
95
- });
96
-
97
- /**
98
- * The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results from JavaScript.
99
- */
100
- env.addReporter(jsApiReporter);
101
- env.addReporter(htmlReporter);
102
-
103
- /**
104
- * Filter which specs will be run by matching the start of the full name against the `spec` query param.
105
- */
106
- const specFilter = new jasmine.HtmlSpecFilter({
107
- filterString: function() {
108
- return queryString.getParam('spec');
109
- }
110
- });
111
-
112
- config.specFilter = function(spec) {
113
- return specFilter.matches(spec.getFullName());
114
- };
115
-
116
- env.configure(config);
117
-
118
- /**
119
- * ## Execution
120
- *
121
- * Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded.
122
- */
123
- const currentWindowOnload = window.onload;
124
-
125
- window.onload = function() {
126
- if (currentWindowOnload) {
127
- currentWindowOnload();
128
- }
129
- htmlReporter.initialize();
130
- env.execute();
131
- };
132
- })();