jasmine-core 5.3.0 → 5.4.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 +11 -7
- package/lib/jasmine-core/jasmine.js +34 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,18 +27,22 @@ for information on writing specs, and [the FAQ](https://jasmine.github.io/pages/
|
|
|
27
27
|
Jasmine tests itself across popular browsers (Safari, Chrome, Firefox, and
|
|
28
28
|
Microsoft Edge) as well as Node.
|
|
29
29
|
|
|
30
|
-
| Environment | Supported versions
|
|
31
|
-
|
|
32
|
-
| Node | 18, 20, 22
|
|
33
|
-
| Safari | 15-17
|
|
34
|
-
| Chrome | Evergreen
|
|
35
|
-
| Firefox | Evergreen, 102
|
|
36
|
-
| Edge | Evergreen
|
|
30
|
+
| Environment | Supported versions |
|
|
31
|
+
|-------------------|----------------------------|
|
|
32
|
+
| Node | 18, 20, 22 |
|
|
33
|
+
| Safari | 15-17 |
|
|
34
|
+
| Chrome | Evergreen |
|
|
35
|
+
| Firefox | Evergreen, 102*, 115*, 128 |
|
|
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
|
|
39
39
|
at the time of release. Other browsers, as well as older & newer versions of some supported browsers, are likely to work.
|
|
40
40
|
However, Jasmine isn't tested against them and they aren't actively supported.
|
|
41
41
|
|
|
42
|
+
\* Environments that are past end of life are supported on a best-effort basis.
|
|
43
|
+
They may be dropped in a future minor release of Jasmine if continued support
|
|
44
|
+
becomes impractical.
|
|
45
|
+
|
|
42
46
|
To find out what environments work with a particular Jasmine release, see the [release notes](https://github.com/jasmine/jasmine/tree/main/release_notes).
|
|
43
47
|
|
|
44
48
|
## Maintainers
|
|
@@ -915,9 +915,9 @@ getJasmineRequireObj().Spec = function(j$) {
|
|
|
915
915
|
* @property {String} fullName - The full description including all ancestors of this spec.
|
|
916
916
|
* @property {String|null} parentSuiteId - The ID of the suite containing this spec, or null if this spec is not in a describe().
|
|
917
917
|
* @property {String} filename - The name of the file the spec was defined in.
|
|
918
|
-
* @property {
|
|
919
|
-
* @property {
|
|
920
|
-
* @property {
|
|
918
|
+
* @property {ExpectationResult[]} failedExpectations - The list of expectations that failed during execution of this spec.
|
|
919
|
+
* @property {ExpectationResult[]} passedExpectations - The list of expectations that passed during execution of this spec.
|
|
920
|
+
* @property {ExpectationResult[]} deprecationWarnings - The list of deprecation warnings that occurred during execution this spec.
|
|
921
921
|
* @property {String} pendingReason - If the spec is {@link pending}, this will be the reason.
|
|
922
922
|
* @property {String} status - Once the spec has completed, this string represents the pass/fail status of this spec.
|
|
923
923
|
* @property {number} duration - The time in ms used by the spec execution, including any before/afterEach.
|
|
@@ -1429,12 +1429,19 @@ getJasmineRequireObj().Env = function(j$) {
|
|
|
1429
1429
|
* @extends Error
|
|
1430
1430
|
* @description Represents a failure of an expectation evaluated with
|
|
1431
1431
|
* {@link throwUnless}. Properties of this error are a subset of the
|
|
1432
|
-
* properties of {@link
|
|
1432
|
+
* properties of {@link ExpectationResult} and have the same values.
|
|
1433
|
+
*
|
|
1434
|
+
* Note: The expected and actual properties are deprecated and may be removed
|
|
1435
|
+
* in a future release. In many Jasmine configurations they are passed
|
|
1436
|
+
* through JSON serialization and deserialization, which is inherently
|
|
1437
|
+
* lossy. In such cases, the expected and actual values may be placeholders
|
|
1438
|
+
* or approximations of the original objects.
|
|
1439
|
+
*
|
|
1433
1440
|
* @property {String} matcherName - The name of the matcher that was executed for this expectation.
|
|
1434
1441
|
* @property {String} message - The failure message for the expectation.
|
|
1435
1442
|
* @property {Boolean} passed - Whether the expectation passed or failed.
|
|
1436
|
-
* @property {Object} expected - If the expectation failed, what was the expected value.
|
|
1437
|
-
* @property {Object} actual - If the expectation failed, what actual value was produced.
|
|
1443
|
+
* @property {Object} expected - Deprecated. If the expectation failed, what was the expected value.
|
|
1444
|
+
* @property {Object} actual - Deprecated. If the expectation failed, what actual value was produced.
|
|
1438
1445
|
*/
|
|
1439
1446
|
const error = new Error(result.message);
|
|
1440
1447
|
error.passed = result.passed;
|
|
@@ -2667,13 +2674,21 @@ getJasmineRequireObj().buildExpectationResult = function(j$) {
|
|
|
2667
2674
|
const exceptionFormatter = new j$.ExceptionFormatter();
|
|
2668
2675
|
|
|
2669
2676
|
/**
|
|
2670
|
-
*
|
|
2677
|
+
* Describes the result of evaluating an expectation
|
|
2678
|
+
*
|
|
2679
|
+
* Note: The expected and actual properties are deprecated and may be removed
|
|
2680
|
+
* in a future release. In many Jasmine configurations they are passed
|
|
2681
|
+
* through JSON serialization and deserialization, which is inherently
|
|
2682
|
+
* lossy. In such cases, the expected and actual values may be placeholders
|
|
2683
|
+
* or approximations of the original objects.
|
|
2684
|
+
*
|
|
2685
|
+
* @typedef ExpectationResult
|
|
2671
2686
|
* @property {String} matcherName - The name of the matcher that was executed for this expectation.
|
|
2672
2687
|
* @property {String} message - The failure message for the expectation.
|
|
2673
2688
|
* @property {String} stack - The stack trace for the failure if available.
|
|
2674
2689
|
* @property {Boolean} passed - Whether the expectation passed or failed.
|
|
2675
|
-
* @property {Object} expected - If the expectation failed, what was the expected value.
|
|
2676
|
-
* @property {Object} actual - If the expectation failed, what actual value was produced.
|
|
2690
|
+
* @property {Object} expected - Deprecated. If the expectation failed, what was the expected value.
|
|
2691
|
+
* @property {Object} actual - Deprecated. If the expectation failed, what actual value was produced.
|
|
2677
2692
|
* @property {String|undefined} globalErrorType - The type of an error that
|
|
2678
2693
|
* is reported on the top suite. Valid values are undefined, "afterAll",
|
|
2679
2694
|
* "load", "lateExpectation", and "lateError".
|
|
@@ -9029,8 +9044,8 @@ getJasmineRequireObj().Runner = function(j$) {
|
|
|
9029
9044
|
* @property {String} incompleteCode - Machine-readable explanation of why the suite was incomplete: 'focused', 'noSpecsFound', or undefined.
|
|
9030
9045
|
* @property {Order} order - Information about the ordering (random or not) of this execution of the suite. Note that this property is not present when Jasmine is run in parallel mode.
|
|
9031
9046
|
* @property {Int} numWorkers - Number of parallel workers. Note that this property is only present when Jasmine is run in parallel mode.
|
|
9032
|
-
* @property {
|
|
9033
|
-
* @property {
|
|
9047
|
+
* @property {ExpectationResult[]} failedExpectations - List of expectations that failed in an {@link afterAll} at the global level.
|
|
9048
|
+
* @property {ExpectationResult[]} deprecationWarnings - List of deprecation warnings that occurred at the global level.
|
|
9034
9049
|
* @since 2.4.0
|
|
9035
9050
|
*/
|
|
9036
9051
|
const jasmineDoneInfo = {
|
|
@@ -9874,9 +9889,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
|
|
|
9874
9889
|
|
|
9875
9890
|
getJasmineRequireObj().StackTrace = function(j$) {
|
|
9876
9891
|
function StackTrace(error) {
|
|
9877
|
-
let lines = error.stack.split('\n')
|
|
9878
|
-
return line !== '';
|
|
9879
|
-
});
|
|
9892
|
+
let lines = error.stack.split('\n');
|
|
9880
9893
|
|
|
9881
9894
|
const extractResult = extractMessage(error.message, lines);
|
|
9882
9895
|
|
|
@@ -9885,6 +9898,10 @@ getJasmineRequireObj().StackTrace = function(j$) {
|
|
|
9885
9898
|
lines = extractResult.remainder;
|
|
9886
9899
|
}
|
|
9887
9900
|
|
|
9901
|
+
lines = lines.filter(function(line) {
|
|
9902
|
+
return line !== '';
|
|
9903
|
+
});
|
|
9904
|
+
|
|
9888
9905
|
const parseResult = tryParseFrames(lines);
|
|
9889
9906
|
this.frames = parseResult.frames;
|
|
9890
9907
|
this.style = parseResult.style;
|
|
@@ -10109,8 +10126,8 @@ getJasmineRequireObj().Suite = function(j$) {
|
|
|
10109
10126
|
* @property {String} fullName - The full description including all ancestors of this suite.
|
|
10110
10127
|
* @property {String|null} parentSuiteId - The ID of the suite containing this suite, or null if this is not in another describe().
|
|
10111
10128
|
* @property {String} filename - The name of the file the suite was defined in.
|
|
10112
|
-
* @property {
|
|
10113
|
-
* @property {
|
|
10129
|
+
* @property {ExpectationResult[]} failedExpectations - The list of expectations that failed in an {@link afterAll} for this suite.
|
|
10130
|
+
* @property {ExpectationResult[]} deprecationWarnings - The list of deprecation warnings that occurred on this suite.
|
|
10114
10131
|
* @property {String} status - Once the suite has completed, this string represents the pass/fail status of this suite.
|
|
10115
10132
|
* @property {number} duration - The time in ms for Suite execution, including any before/afterAll, before/afterEach.
|
|
10116
10133
|
* @property {Object} properties - User-supplied properties, if any, that were set using {@link Env#setSuiteProperty}
|
|
@@ -10982,5 +10999,5 @@ getJasmineRequireObj().UserContext = function(j$) {
|
|
|
10982
10999
|
};
|
|
10983
11000
|
|
|
10984
11001
|
getJasmineRequireObj().version = function() {
|
|
10985
|
-
return '5.
|
|
11002
|
+
return '5.4.0';
|
|
10986
11003
|
};
|