jasmine-core 3.10.1 → 3.99.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e53bb2ffdd38dde12489182d0027702dd211570514504e56182ab49b44f58d61
4
- data.tar.gz: be2768cd729d9afe30c20a587b7b6693c2350e987f06efb71b993f68bab68db2
3
+ metadata.gz: 9c82f2cad2b9bb4ca4dd95a567ee1cf2bed5d1938247ff3dfe3c34e182c40804
4
+ data.tar.gz: e6e0f670ca4886b8fdd9aa1d88757efdfd7cba381ea1e9c99c82f5affe7f4b3b
5
5
  SHA512:
6
- metadata.gz: 02ad3d70b677f3ee7e0f7276260a6d961a6561dba2efbe779bd1073519cbe40cef37698625185888ad540dd503a40c5025cb603c9472150820498904f72ff71e
7
- data.tar.gz: f5b513c2dd3f2b0c6d8c08df48719bbdbdf2eb1eb336fda4dbeb409eec1b5c6fc7c746e51695798d173e88c41e2ba134bcdc23e28ec415068d683e277a4218da
6
+ metadata.gz: c2bac4df4afbb83a1c2a440e2eef8083e91843e92a4a4df9ee38ecd0063678b77d3428a696734deea582697e4e5111fff750d2f5bfa8edb3921037cdf5d8ffa3
7
+ data.tar.gz: 9fc060a26b269eb1acfbd2a79c507267f649ef839674b2ccd5f87af336fe4efb3e6394f8989fd17d647f04e7987f8b1628befd6191e9119d9621b3fa324e059d
@@ -59,8 +59,8 @@
59
59
  var filterSpecs = !!queryString.getParam("spec");
60
60
 
61
61
  var config = {
62
- failFast: queryString.getParam("failFast"),
63
- oneFailurePerSpec: queryString.getParam("oneFailurePerSpec"),
62
+ stopOnSpecFailure: queryString.getParam("failFast"),
63
+ stopSpecOnExpectationFailure: queryString.getParam("oneFailurePerSpec"),
64
64
  hideDisabled: queryString.getParam("hideDisabled")
65
65
  };
66
66
 
@@ -140,4 +140,6 @@
140
140
  return destination;
141
141
  }
142
142
 
143
+ env.deprecated('boot.js is deprecated. Please use boot0.js and boot1.js instead.',
144
+ { ignoreRunnable: true });
143
145
  }());
@@ -27,8 +27,8 @@
27
27
  var filterSpecs = !!queryString.getParam("spec");
28
28
 
29
29
  var config = {
30
- failFast: queryString.getParam("failFast"),
31
- oneFailurePerSpec: queryString.getParam("oneFailurePerSpec"),
30
+ stopOnSpecFailure: queryString.getParam("failFast"),
31
+ stopSpecOnExpectationFailure: queryString.getParam("oneFailurePerSpec"),
32
32
  hideDisabled: queryString.getParam("hideDisabled")
33
33
  };
34
34
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2008-2021 Pivotal Labs
2
+ Copyright (c) 2008-2022 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
@@ -81,8 +81,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
81
81
  var filterSpecs = !!queryString.getParam("spec");
82
82
 
83
83
  var config = {
84
- failFast: queryString.getParam("failFast"),
85
- oneFailurePerSpec: queryString.getParam("oneFailurePerSpec"),
84
+ stopOnSpecFailure: queryString.getParam("failFast"),
85
+ stopSpecOnExpectationFailure: queryString.getParam("oneFailurePerSpec"),
86
86
  hideDisabled: queryString.getParam("hideDisabled")
87
87
  };
88
88
 
@@ -162,4 +162,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
162
162
  return destination;
163
163
  }
164
164
 
165
+ env.deprecated('boot.js is deprecated. Please use boot0.js and boot1.js instead.',
166
+ { ignoreRunnable: true });
165
167
  }());
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2008-2021 Pivotal Labs
2
+ Copyright (c) 2008-2022 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
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2008-2021 Pivotal Labs
2
+ Copyright (c) 2008-2022 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
@@ -49,8 +49,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49
49
  var filterSpecs = !!queryString.getParam("spec");
50
50
 
51
51
  var config = {
52
- failFast: queryString.getParam("failFast"),
53
- oneFailurePerSpec: queryString.getParam("oneFailurePerSpec"),
52
+ stopOnSpecFailure: queryString.getParam("failFast"),
53
+ stopSpecOnExpectationFailure: queryString.getParam("oneFailurePerSpec"),
54
54
  hideDisabled: queryString.getParam("hideDisabled")
55
55
  };
56
56
 
@@ -54,14 +54,14 @@ class Core(object):
54
54
  # jasmine.js needs to be first
55
55
  js_files.insert(0, 'jasmine.js')
56
56
 
57
- # boot needs to be last
57
+ # Remove the legacy boot file
58
58
  js_files.remove('boot.js')
59
- js_files.append('boot.js')
60
59
 
61
- # Remove the new boot files. jasmine-py will continue to use the legacy
62
- # boot.js.
60
+ # boot files need to be last
63
61
  js_files.remove('boot0.js')
64
62
  js_files.remove('boot1.js')
63
+ js_files.append('boot0.js')
64
+ js_files.append('boot1.js')
65
65
 
66
66
  return cls._uniq(js_files)
67
67
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2008-2021 Pivotal Labs
2
+ Copyright (c) 2008-2022 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
@@ -311,7 +311,8 @@ jasmineRequire.HtmlReporter = function(j$) {
311
311
  addDeprecationWarnings(doneResult);
312
312
 
313
313
  for (i = 0; i < deprecationWarnings.length; i++) {
314
- var context;
314
+ var children = [],
315
+ context;
315
316
 
316
317
  switch (deprecationWarnings[i].runnableType) {
317
318
  case 'spec':
@@ -324,13 +325,23 @@ jasmineRequire.HtmlReporter = function(j$) {
324
325
  context = '';
325
326
  }
326
327
 
328
+ deprecationWarnings[i].message.split('\n').forEach(function(line) {
329
+ children.push(line);
330
+ children.push(createDom('br'));
331
+ });
332
+
333
+ children[0] = 'DEPRECATION: ' + children[0];
334
+ children.push(context);
335
+
336
+ if (deprecationWarnings[i].stack) {
337
+ children.push(createExpander(deprecationWarnings[i].stack));
338
+ }
339
+
327
340
  alert.appendChild(
328
341
  createDom(
329
342
  'span',
330
343
  { className: 'jasmine-bar jasmine-warning' },
331
- 'DEPRECATION: ' + deprecationWarnings[i].message,
332
- createDom('br'),
333
- context
344
+ children
334
345
  )
335
346
  );
336
347
  }
@@ -652,17 +663,44 @@ jasmineRequire.HtmlReporter = function(j$) {
652
663
  if (result && result.deprecationWarnings) {
653
664
  for (var i = 0; i < result.deprecationWarnings.length; i++) {
654
665
  var warning = result.deprecationWarnings[i].message;
655
- if (!j$.util.arrayContains(warning)) {
656
- deprecationWarnings.push({
657
- message: warning,
658
- runnableName: result.fullName,
659
- runnableType: runnableType
660
- });
661
- }
666
+ deprecationWarnings.push({
667
+ message: warning,
668
+ stack: result.deprecationWarnings[i].stack,
669
+ runnableName: result.fullName,
670
+ runnableType: runnableType
671
+ });
662
672
  }
663
673
  }
664
674
  }
665
675
 
676
+ function createExpander(stackTrace) {
677
+ var expandLink = createDom('a', { href: '#' }, 'Show stack trace');
678
+ var root = createDom(
679
+ 'div',
680
+ { className: 'jasmine-expander' },
681
+ expandLink,
682
+ createDom(
683
+ 'div',
684
+ { className: 'jasmine-expander-contents jasmine-stack-trace' },
685
+ stackTrace
686
+ )
687
+ );
688
+
689
+ expandLink.addEventListener('click', function(e) {
690
+ e.preventDefault();
691
+
692
+ if (root.classList.contains('jasmine-expanded')) {
693
+ root.classList.remove('jasmine-expanded');
694
+ expandLink.textContent = 'Show stack trace';
695
+ } else {
696
+ root.classList.add('jasmine-expanded');
697
+ expandLink.textContent = 'Hide stack trace';
698
+ }
699
+ });
700
+
701
+ return root;
702
+ }
703
+
666
704
  function find(selector) {
667
705
  return getContainer().querySelector('.jasmine_html-reporter ' + selector);
668
706
  }
@@ -676,11 +714,23 @@ jasmineRequire.HtmlReporter = function(j$) {
676
714
  }
677
715
  }
678
716
 
679
- function createDom(type, attrs, childrenVarArgs) {
680
- var el = createElement(type);
717
+ function createDom(type, attrs, childrenArrayOrVarArgs) {
718
+ var el = createElement(type),
719
+ children,
720
+ i;
721
+
722
+ if (j$.isArray_(childrenArrayOrVarArgs)) {
723
+ children = childrenArrayOrVarArgs;
724
+ } else {
725
+ children = [];
726
+
727
+ for (i = 2; i < arguments.length; i++) {
728
+ children.push(arguments[i]);
729
+ }
730
+ }
681
731
 
682
- for (var i = 2; i < arguments.length; i++) {
683
- var child = arguments[i];
732
+ for (i = 0; i < children.length; i++) {
733
+ var child = children[i];
684
734
 
685
735
  if (typeof child === 'string') {
686
736
  el.appendChild(createTextNode(child));
@@ -165,6 +165,8 @@ body {
165
165
  background-color: #bababa;
166
166
  }
167
167
  .jasmine_html-reporter .jasmine-bar.jasmine-warning {
168
+ margin-top: 14px;
169
+ margin-bottom: 14px;
168
170
  background-color: #ba9d37;
169
171
  color: #333;
170
172
  }
@@ -268,4 +270,21 @@ body {
268
270
  border: 1px solid #ddd;
269
271
  background: white;
270
272
  white-space: pre;
273
+ }
274
+ .jasmine_html-reporter .jasmine-expander a {
275
+ display: block;
276
+ margin-left: 14px;
277
+ color: blue;
278
+ text-decoration: underline;
279
+ }
280
+ .jasmine_html-reporter .jasmine-expander-contents {
281
+ display: none;
282
+ }
283
+ .jasmine_html-reporter .jasmine-expanded {
284
+ padding-bottom: 10px;
285
+ }
286
+ .jasmine_html-reporter .jasmine-expanded .jasmine-expander-contents {
287
+ display: block;
288
+ margin-left: 14px;
289
+ padding: 5px;
271
290
  }