jasmine-core 6.0.1 → 6.2.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.
- package/README.md +2 -2
- package/lib/jasmine-core/boot0.js +2 -2
- package/lib/jasmine-core/jasmine-html.js +3 -3
- package/lib/jasmine-core/jasmine.js +207 -125
- package/lib/jasmine-core.js +9 -9
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -30,9 +30,9 @@ Microsoft Edge) as well as Node.
|
|
|
30
30
|
| Environment | Supported versions |
|
|
31
31
|
|-------------------|----------------------------------|
|
|
32
32
|
| Node | 20, 22, 24 |
|
|
33
|
-
| Safari |
|
|
33
|
+
| Safari | 26* |
|
|
34
34
|
| Chrome | Evergreen |
|
|
35
|
-
| Firefox | Evergreen,
|
|
35
|
+
| Firefox | Evergreen, 140 |
|
|
36
36
|
| Edge | Evergreen |
|
|
37
37
|
|
|
38
38
|
For evergreen browsers, each version of Jasmine is tested against the version of the browser that is available to us
|
|
@@ -38,8 +38,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
38
38
|
*
|
|
39
39
|
* Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference.
|
|
40
40
|
*/
|
|
41
|
-
const jasmine = jasmineRequire.core(jasmineRequire)
|
|
42
|
-
|
|
41
|
+
const jasmine = jasmineRequire.core(jasmineRequire);
|
|
42
|
+
const global = jasmine.getGlobal();
|
|
43
43
|
global.jasmine = jasmine;
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -707,9 +707,9 @@ jasmineRequire.Banner = function(j$) {
|
|
|
707
707
|
};
|
|
708
708
|
}
|
|
709
709
|
|
|
710
|
-
const optionsTrigger = optionsMenuDom.querySelector('.jasmine-trigger')
|
|
711
|
-
|
|
712
|
-
|
|
710
|
+
const optionsTrigger = optionsMenuDom.querySelector('.jasmine-trigger');
|
|
711
|
+
const optionsPayload = optionsMenuDom.querySelector('.jasmine-payload');
|
|
712
|
+
const isOpen = /\bjasmine-open\b/;
|
|
713
713
|
|
|
714
714
|
optionsTrigger.onclick = function() {
|
|
715
715
|
if (isOpen.test(optionsPayload.className)) {
|
|
@@ -153,43 +153,43 @@ getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
|
|
|
153
153
|
'use strict';
|
|
154
154
|
|
|
155
155
|
const availableMatchers = [
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
156
|
+
'nothing',
|
|
157
|
+
'toBe',
|
|
158
|
+
'toBeCloseTo',
|
|
159
|
+
'toBeDefined',
|
|
160
|
+
'toBeInstanceOf',
|
|
161
|
+
'toBeFalse',
|
|
162
|
+
'toBeFalsy',
|
|
163
|
+
'toBeGreaterThan',
|
|
164
|
+
'toBeGreaterThanOrEqual',
|
|
165
|
+
'toBeLessThan',
|
|
166
|
+
'toBeLessThanOrEqual',
|
|
167
|
+
'toBeNaN',
|
|
168
|
+
'toBeNegativeInfinity',
|
|
169
|
+
'toBeNull',
|
|
170
|
+
'toBePositiveInfinity',
|
|
171
|
+
'toBeTrue',
|
|
172
|
+
'toBeTruthy',
|
|
173
|
+
'toBeUndefined',
|
|
174
|
+
'toBeNullish',
|
|
175
|
+
'toContain',
|
|
176
|
+
'toEqual',
|
|
177
|
+
'toHaveSize',
|
|
178
|
+
'toHaveBeenCalled',
|
|
179
|
+
'toHaveBeenCalledBefore',
|
|
180
|
+
'toHaveBeenCalledOnceWith',
|
|
181
|
+
'toHaveBeenCalledTimes',
|
|
182
|
+
'toHaveBeenCalledWith',
|
|
183
|
+
'toHaveClass',
|
|
184
|
+
'toHaveClasses',
|
|
185
|
+
'toHaveSpyInteractions',
|
|
186
|
+
'toHaveNoOtherSpyInteractions',
|
|
187
|
+
'toMatch',
|
|
188
|
+
'toThrow',
|
|
189
|
+
'toThrowError',
|
|
190
|
+
'toThrowMatching'
|
|
191
|
+
];
|
|
192
|
+
const matchers = {};
|
|
193
193
|
|
|
194
194
|
for (const name of availableMatchers) {
|
|
195
195
|
matchers[name] = jRequire[name](j$);
|
|
@@ -222,7 +222,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
|
|
222
222
|
* Maximum number of characters to display when pretty printing objects.
|
|
223
223
|
* Characters past this number will be ellipised.
|
|
224
224
|
* @name jasmine.MAX_PRETTY_PRINT_CHARS
|
|
225
|
-
* @default
|
|
225
|
+
* @default 1000
|
|
226
226
|
* @since 2.9.0
|
|
227
227
|
*/
|
|
228
228
|
j$.MAX_PRETTY_PRINT_CHARS = 1000;
|
|
@@ -733,8 +733,8 @@ getJasmineRequireObj().util = function(j$) {
|
|
|
733
733
|
|
|
734
734
|
util.cloneArgs = function(args) {
|
|
735
735
|
return Array.from(args).map(function(arg) {
|
|
736
|
-
const str = Object.prototype.toString.apply(arg)
|
|
737
|
-
|
|
736
|
+
const str = Object.prototype.toString.apply(arg);
|
|
737
|
+
const primitives = /^\[object (Boolean|String|RegExp|Number)/;
|
|
738
738
|
|
|
739
739
|
// All falsey values are either primitives, `null`, or `undefined.
|
|
740
740
|
if (!arg || str.match(primitives)) {
|
|
@@ -748,8 +748,8 @@ getJasmineRequireObj().util = function(j$) {
|
|
|
748
748
|
};
|
|
749
749
|
|
|
750
750
|
util.getPropertyDescriptor = function(obj, methodName) {
|
|
751
|
-
let descriptor
|
|
752
|
-
|
|
751
|
+
let descriptor;
|
|
752
|
+
let proto = obj;
|
|
753
753
|
|
|
754
754
|
do {
|
|
755
755
|
descriptor = Object.getOwnPropertyDescriptor(proto, methodName);
|
|
@@ -1175,10 +1175,12 @@ getJasmineRequireObj().Spec = function(j$) {
|
|
|
1175
1175
|
}
|
|
1176
1176
|
|
|
1177
1177
|
const extractCustomPendingMessage = function(e) {
|
|
1178
|
-
const fullMessage = e.toString()
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1178
|
+
const fullMessage = e.toString();
|
|
1179
|
+
const boilerplateStart = fullMessage.indexOf(
|
|
1180
|
+
Spec.pendingSpecExceptionMessage
|
|
1181
|
+
);
|
|
1182
|
+
const boilerplateEnd =
|
|
1183
|
+
boilerplateStart + Spec.pendingSpecExceptionMessage.length;
|
|
1182
1184
|
|
|
1183
1185
|
return fullMessage.slice(boilerplateEnd);
|
|
1184
1186
|
};
|
|
@@ -2139,8 +2141,8 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
|
|
|
2139
2141
|
return status;
|
|
2140
2142
|
};
|
|
2141
2143
|
|
|
2142
|
-
const suites = []
|
|
2143
|
-
|
|
2144
|
+
const suites = [];
|
|
2145
|
+
const suites_hash = {};
|
|
2144
2146
|
|
|
2145
2147
|
this.suiteStarted = function(result) {
|
|
2146
2148
|
suites_hash[result.id] = result;
|
|
@@ -4003,7 +4005,8 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) {
|
|
|
4003
4005
|
'lineNumber',
|
|
4004
4006
|
'column',
|
|
4005
4007
|
'description',
|
|
4006
|
-
'jasmineMessage'
|
|
4008
|
+
'jasmineMessage',
|
|
4009
|
+
'errors'
|
|
4007
4010
|
];
|
|
4008
4011
|
|
|
4009
4012
|
function ExceptionFormatter(options) {
|
|
@@ -4069,6 +4072,19 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) {
|
|
|
4069
4072
|
lines = lines.concat(substack);
|
|
4070
4073
|
}
|
|
4071
4074
|
|
|
4075
|
+
if (Array.isArray(error.errors)) {
|
|
4076
|
+
for (let i = 0; i < error.errors.length; i++) {
|
|
4077
|
+
if (error.errors[i] instanceof Error) {
|
|
4078
|
+
lines.push('');
|
|
4079
|
+
const substack = this.stack_(error.errors[i], {
|
|
4080
|
+
messageHandling: 'require'
|
|
4081
|
+
});
|
|
4082
|
+
substack[0] = 'Error ' + (i + 1) + ': ' + substack[0];
|
|
4083
|
+
lines = lines.concat(substack.map(x => ' ' + x));
|
|
4084
|
+
}
|
|
4085
|
+
}
|
|
4086
|
+
}
|
|
4087
|
+
|
|
4072
4088
|
return lines;
|
|
4073
4089
|
};
|
|
4074
4090
|
|
|
@@ -5108,6 +5124,71 @@ getJasmineRequireObj().toBeRejectedWithError = function(j$) {
|
|
|
5108
5124
|
}
|
|
5109
5125
|
};
|
|
5110
5126
|
|
|
5127
|
+
getJasmineRequireObj().toBeRejectedWithMatching = function(j$) {
|
|
5128
|
+
'use strict';
|
|
5129
|
+
|
|
5130
|
+
const usageError = j$.private.formatErrorMsg(
|
|
5131
|
+
'<toBeRejectedWithMatching>',
|
|
5132
|
+
'expect(function() {<expectation>}).toBeRejectedWithMatching(<Predicate>)'
|
|
5133
|
+
);
|
|
5134
|
+
|
|
5135
|
+
/**
|
|
5136
|
+
* Expect a promise to be rejected with a value matching a predicate.
|
|
5137
|
+
* @function
|
|
5138
|
+
* @async
|
|
5139
|
+
* @name async-matchers#toBeRejectedWithMatching
|
|
5140
|
+
* @since 6.2.0
|
|
5141
|
+
* @param {Function} predicate - A function that takes the rejected promise value as its parameter and returns true if it matches.
|
|
5142
|
+
* @example
|
|
5143
|
+
* await expectAsync(aPromise).toBeRejectedWithMatching((error) => error.message === 'Some error');
|
|
5144
|
+
* @example
|
|
5145
|
+
* return expectAsync(aPromise).toBeRejectedWithMatching((error) => error.message === 'Some error');
|
|
5146
|
+
*/
|
|
5147
|
+
return function toBeRejectedWithMatching() {
|
|
5148
|
+
return {
|
|
5149
|
+
compare: function(actualPromise, predicate) {
|
|
5150
|
+
if (!j$.private.isPromiseLike(actualPromise)) {
|
|
5151
|
+
throw new Error(
|
|
5152
|
+
`Expected toBeRejectedWithMatching to be called on a promise but was on a ${typeof actualPromise}.`
|
|
5153
|
+
);
|
|
5154
|
+
}
|
|
5155
|
+
|
|
5156
|
+
if (typeof predicate !== 'function') {
|
|
5157
|
+
throw new Error(usageError('Predicate is not a Function'));
|
|
5158
|
+
}
|
|
5159
|
+
|
|
5160
|
+
function prefix(passed) {
|
|
5161
|
+
return (
|
|
5162
|
+
'Expected a promise ' +
|
|
5163
|
+
(passed ? 'not ' : '') +
|
|
5164
|
+
'to be rejected matching a predicate'
|
|
5165
|
+
);
|
|
5166
|
+
}
|
|
5167
|
+
|
|
5168
|
+
return actualPromise.then(
|
|
5169
|
+
function() {
|
|
5170
|
+
return {
|
|
5171
|
+
pass: false,
|
|
5172
|
+
message: prefix(false) + ', but it was resolved.'
|
|
5173
|
+
};
|
|
5174
|
+
},
|
|
5175
|
+
function(actualValue) {
|
|
5176
|
+
const result = predicate(actualValue);
|
|
5177
|
+
return {
|
|
5178
|
+
pass: Boolean(result),
|
|
5179
|
+
message:
|
|
5180
|
+
prefix(result) +
|
|
5181
|
+
', but the predicate returned "' +
|
|
5182
|
+
result +
|
|
5183
|
+
'".'
|
|
5184
|
+
};
|
|
5185
|
+
}
|
|
5186
|
+
);
|
|
5187
|
+
}
|
|
5188
|
+
};
|
|
5189
|
+
};
|
|
5190
|
+
};
|
|
5191
|
+
|
|
5111
5192
|
getJasmineRequireObj().toBeResolved = function(j$) {
|
|
5112
5193
|
'use strict';
|
|
5113
5194
|
|
|
@@ -5412,14 +5493,14 @@ getJasmineRequireObj().MatchersUtil = function(j$) {
|
|
|
5412
5493
|
};
|
|
5413
5494
|
|
|
5414
5495
|
MatchersUtil.prototype.buildFailureMessage = function() {
|
|
5415
|
-
const args = Array.prototype.slice.call(arguments, 0)
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5496
|
+
const args = Array.prototype.slice.call(arguments, 0);
|
|
5497
|
+
const matcherName = args[0];
|
|
5498
|
+
const isNot = args[1];
|
|
5499
|
+
const actual = args[2];
|
|
5500
|
+
const expected = args.slice(3);
|
|
5501
|
+
const englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) {
|
|
5502
|
+
return ' ' + s.toLowerCase();
|
|
5503
|
+
});
|
|
5423
5504
|
|
|
5424
5505
|
let message =
|
|
5425
5506
|
'Expected ' +
|
|
@@ -5801,8 +5882,8 @@ getJasmineRequireObj().MatchersUtil = function(j$) {
|
|
|
5801
5882
|
} else {
|
|
5802
5883
|
// Objects with different constructors are not equivalent, but `Object`s
|
|
5803
5884
|
// or `Array`s from different frames are.
|
|
5804
|
-
const aCtor = a.constructor
|
|
5805
|
-
|
|
5885
|
+
const aCtor = a.constructor;
|
|
5886
|
+
const bCtor = b.constructor;
|
|
5806
5887
|
if (
|
|
5807
5888
|
aCtor !== bCtor &&
|
|
5808
5889
|
isFunction(aCtor) &&
|
|
@@ -5908,11 +5989,11 @@ getJasmineRequireObj().MatchersUtil = function(j$) {
|
|
|
5908
5989
|
}
|
|
5909
5990
|
|
|
5910
5991
|
function objectKeysAreDifferentFormatter(pp, actual, expected, path) {
|
|
5911
|
-
const missingProperties = extraKeysAndValues(expected, actual)
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5992
|
+
const missingProperties = extraKeysAndValues(expected, actual);
|
|
5993
|
+
const extraProperties = extraKeysAndValues(actual, expected);
|
|
5994
|
+
const missingPropertiesMessage = formatKeyValuePairs(pp, missingProperties);
|
|
5995
|
+
const extraPropertiesMessage = formatKeyValuePairs(pp, extraProperties);
|
|
5996
|
+
const messages = [];
|
|
5916
5997
|
|
|
5917
5998
|
if (!path.depth()) {
|
|
5918
5999
|
path = 'object';
|
|
@@ -6170,14 +6251,15 @@ getJasmineRequireObj().requireAsyncMatchers = function(jRequire, j$) {
|
|
|
6170
6251
|
'use strict';
|
|
6171
6252
|
|
|
6172
6253
|
const availableMatchers = [
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6254
|
+
'toBePending',
|
|
6255
|
+
'toBeResolved',
|
|
6256
|
+
'toBeRejected',
|
|
6257
|
+
'toBeResolvedTo',
|
|
6258
|
+
'toBeRejectedWith',
|
|
6259
|
+
'toBeRejectedWithError',
|
|
6260
|
+
'toBeRejectedWithMatching'
|
|
6261
|
+
];
|
|
6262
|
+
const matchers = {};
|
|
6181
6263
|
|
|
6182
6264
|
for (const name of availableMatchers) {
|
|
6183
6265
|
matchers[name] = jRequire[name](j$);
|
|
@@ -6783,11 +6865,11 @@ getJasmineRequireObj().toEqual = function(j$) {
|
|
|
6783
6865
|
return {
|
|
6784
6866
|
compare: function(actual, expected) {
|
|
6785
6867
|
const result = {
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6868
|
+
pass: false
|
|
6869
|
+
};
|
|
6870
|
+
const diffBuilder = new j$.private.DiffBuilder({
|
|
6871
|
+
prettyPrinter: matchersUtil.pp
|
|
6872
|
+
});
|
|
6791
6873
|
|
|
6792
6874
|
result.pass = matchersUtil.equals(actual, expected, diffBuilder);
|
|
6793
6875
|
|
|
@@ -6972,9 +7054,9 @@ getJasmineRequireObj().toHaveBeenCalledOnceWith = function(j$) {
|
|
|
6972
7054
|
function toHaveBeenCalledOnceWith(matchersUtil) {
|
|
6973
7055
|
return {
|
|
6974
7056
|
compare: function() {
|
|
6975
|
-
const args = Array.prototype.slice.call(arguments, 0)
|
|
6976
|
-
|
|
6977
|
-
|
|
7057
|
+
const args = Array.prototype.slice.call(arguments, 0);
|
|
7058
|
+
const actual = args[0];
|
|
7059
|
+
const expectedArgs = args.slice(1);
|
|
6978
7060
|
|
|
6979
7061
|
if (!j$.isSpy(actual)) {
|
|
6980
7062
|
throw new Error(
|
|
@@ -7091,8 +7173,8 @@ getJasmineRequireObj().toHaveBeenCalledTimes = function(j$) {
|
|
|
7091
7173
|
);
|
|
7092
7174
|
}
|
|
7093
7175
|
|
|
7094
|
-
const args = Array.prototype.slice.call(arguments, 0)
|
|
7095
|
-
|
|
7176
|
+
const args = Array.prototype.slice.call(arguments, 0);
|
|
7177
|
+
const result = { pass: false };
|
|
7096
7178
|
|
|
7097
7179
|
if (!j$.private.isNumber(expected)) {
|
|
7098
7180
|
throw new Error(
|
|
@@ -7161,10 +7243,10 @@ getJasmineRequireObj().toHaveBeenCalledWith = function(j$) {
|
|
|
7161
7243
|
function toHaveBeenCalledWith(matchersUtil) {
|
|
7162
7244
|
return {
|
|
7163
7245
|
compare: function() {
|
|
7164
|
-
const args = Array.prototype.slice.call(arguments, 0)
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7246
|
+
const args = Array.prototype.slice.call(arguments, 0);
|
|
7247
|
+
const actual = args[0];
|
|
7248
|
+
const expectedArgs = args.slice(1);
|
|
7249
|
+
const result = { pass: false };
|
|
7168
7250
|
|
|
7169
7251
|
if (!j$.isSpy(actual)) {
|
|
7170
7252
|
throw new Error(
|
|
@@ -10053,22 +10135,22 @@ getJasmineRequireObj().Spy = function(j$) {
|
|
|
10053
10135
|
};
|
|
10054
10136
|
const { originalFn, customStrategies, defaultStrategyFn } = optionals || {};
|
|
10055
10137
|
|
|
10056
|
-
const numArgs = typeof originalFn === 'function' ? originalFn.length : 0
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
},
|
|
10067
|
-
customStrategies: customStrategies
|
|
10138
|
+
const numArgs = typeof originalFn === 'function' ? originalFn.length : 0;
|
|
10139
|
+
const wrapper = makeFunc(numArgs, function(context, args, invokeNew) {
|
|
10140
|
+
return spy(context, args, invokeNew);
|
|
10141
|
+
});
|
|
10142
|
+
const strategyDispatcher = new SpyStrategyDispatcher(
|
|
10143
|
+
{
|
|
10144
|
+
name: name,
|
|
10145
|
+
fn: originalFn,
|
|
10146
|
+
getSpy: function() {
|
|
10147
|
+
return wrapper;
|
|
10068
10148
|
},
|
|
10069
|
-
|
|
10070
|
-
|
|
10071
|
-
|
|
10149
|
+
customStrategies: customStrategies
|
|
10150
|
+
},
|
|
10151
|
+
matchersUtil
|
|
10152
|
+
);
|
|
10153
|
+
const callTracker = new j$.private.CallTracker();
|
|
10072
10154
|
|
|
10073
10155
|
function makeFunc(length, fn) {
|
|
10074
10156
|
switch (length) {
|
|
@@ -10515,10 +10597,10 @@ getJasmineRequireObj().SpyRegistry = function(j$) {
|
|
|
10515
10597
|
);
|
|
10516
10598
|
}
|
|
10517
10599
|
|
|
10518
|
-
let pointer = obj
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10600
|
+
let pointer = obj;
|
|
10601
|
+
let propsToSpyOn = [];
|
|
10602
|
+
let properties;
|
|
10603
|
+
let propertiesToSkip = [];
|
|
10522
10604
|
|
|
10523
10605
|
while (
|
|
10524
10606
|
pointer &&
|
|
@@ -11802,9 +11884,9 @@ getJasmineRequireObj().SuiteBuilder = function(j$) {
|
|
|
11802
11884
|
|
|
11803
11885
|
function beforeAndAfterFns(targetSuite) {
|
|
11804
11886
|
return function() {
|
|
11805
|
-
let befores = []
|
|
11806
|
-
|
|
11807
|
-
|
|
11887
|
+
let befores = [];
|
|
11888
|
+
let afters = [];
|
|
11889
|
+
let suite = targetSuite;
|
|
11808
11890
|
|
|
11809
11891
|
while (suite) {
|
|
11810
11892
|
befores = befores.concat(suite.beforeFns);
|
|
@@ -12015,15 +12097,15 @@ getJasmineRequireObj().TreeProcessor = function(j$) {
|
|
|
12015
12097
|
|
|
12016
12098
|
function segmentChildren(node, orderedChildren, stats, executableIndex) {
|
|
12017
12099
|
let currentSegment = {
|
|
12018
|
-
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
|
|
12026
|
-
|
|
12100
|
+
index: 0,
|
|
12101
|
+
owner: node,
|
|
12102
|
+
nodes: [],
|
|
12103
|
+
min: startingMin(executableIndex),
|
|
12104
|
+
max: startingMax(executableIndex)
|
|
12105
|
+
};
|
|
12106
|
+
let result = [currentSegment];
|
|
12107
|
+
let lastMax = defaultMax;
|
|
12108
|
+
let orderedChildSegments = orderChildSegments(orderedChildren, stats);
|
|
12027
12109
|
|
|
12028
12110
|
function isSegmentBoundary(minIndex) {
|
|
12029
12111
|
return (
|
|
@@ -12034,9 +12116,9 @@ getJasmineRequireObj().TreeProcessor = function(j$) {
|
|
|
12034
12116
|
}
|
|
12035
12117
|
|
|
12036
12118
|
for (let i = 0; i < orderedChildSegments.length; i++) {
|
|
12037
|
-
const childSegment = orderedChildSegments[i]
|
|
12038
|
-
|
|
12039
|
-
|
|
12119
|
+
const childSegment = orderedChildSegments[i];
|
|
12120
|
+
const maxIndex = childSegment.max;
|
|
12121
|
+
const minIndex = childSegment.min;
|
|
12040
12122
|
|
|
12041
12123
|
if (isSegmentBoundary(minIndex)) {
|
|
12042
12124
|
currentSegment = {
|
|
@@ -12059,12 +12141,12 @@ getJasmineRequireObj().TreeProcessor = function(j$) {
|
|
|
12059
12141
|
}
|
|
12060
12142
|
|
|
12061
12143
|
function orderChildSegments(children, stats) {
|
|
12062
|
-
const specifiedOrder = []
|
|
12063
|
-
|
|
12144
|
+
const specifiedOrder = [];
|
|
12145
|
+
const unspecifiedOrder = [];
|
|
12064
12146
|
|
|
12065
12147
|
for (let i = 0; i < children.length; i++) {
|
|
12066
|
-
const child = children[i]
|
|
12067
|
-
|
|
12148
|
+
const child = children[i];
|
|
12149
|
+
const segments = stats[child.id].segments;
|
|
12068
12150
|
|
|
12069
12151
|
for (let j = 0; j < segments.length; j++) {
|
|
12070
12152
|
const seg = segments[j];
|
|
@@ -12408,5 +12490,5 @@ getJasmineRequireObj().UserContext = function(j$) {
|
|
|
12408
12490
|
};
|
|
12409
12491
|
|
|
12410
12492
|
getJasmineRequireObj().version = function() {
|
|
12411
|
-
return '6.0
|
|
12493
|
+
return '6.2.0';
|
|
12412
12494
|
};
|
package/lib/jasmine-core.js
CHANGED
|
@@ -79,15 +79,15 @@ module.exports.noGlobals = function() {
|
|
|
79
79
|
return jasmineInterface;
|
|
80
80
|
};
|
|
81
81
|
|
|
82
|
-
const path = require('path')
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const rootPath = path.join(__dirname, 'jasmine-core')
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
const path = require('path');
|
|
83
|
+
const fs = require('fs');
|
|
84
|
+
|
|
85
|
+
const rootPath = path.join(__dirname, 'jasmine-core');
|
|
86
|
+
const bootFiles = ['boot0.js', 'boot1.js'];
|
|
87
|
+
const legacyBootFiles = ['boot.js'];
|
|
88
|
+
const cssFiles = [];
|
|
89
|
+
const jsFiles = [];
|
|
90
|
+
const jsFilesToSkip = ['jasmine.js'].concat(bootFiles, legacyBootFiles);
|
|
91
91
|
|
|
92
92
|
fs.readdirSync(rootPath).forEach(function(file) {
|
|
93
93
|
if (fs.statSync(path.join(rootPath, file)).isFile()) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jasmine-core",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "6.0
|
|
4
|
+
"version": "6.2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/jasmine/jasmine.git"
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"sass": "^1.58.3"
|
|
53
53
|
},
|
|
54
54
|
"browserslist": [
|
|
55
|
-
"Safari >=
|
|
56
|
-
"Firefox >=
|
|
55
|
+
"Safari >= 26",
|
|
56
|
+
"Firefox >= 140",
|
|
57
57
|
"last 2 Chrome versions",
|
|
58
58
|
"last 2 Edge versions"
|
|
59
59
|
]
|