jasmine-core 6.0.0-alpha.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.
@@ -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.HtmlReporter({
71
- env: env,
72
- navigateWithNewParam: function(key, value) {
73
- return queryString.navigateWithNewParam(key, value);
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,7 @@ 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
- /**
98
- * Filter which specs will be run by matching the start of the full name against the `spec` query param.
99
- */
100
- const specFilter = new jasmine.HtmlExactSpecFilter({ queryString });
101
- config.specFilter = function(spec) {
102
- return specFilter.matches(spec);
103
- };
104
-
105
- env.configure(config);
61
+ env.configure(urls.configFromCurrentUrl());
106
62
 
107
63
  /**
108
64
  * ## Execution