Compare commits
15 Commits
v6.0.0-bet
...
v6.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a6f6d2b0e | ||
|
|
6755b03f12 | ||
|
|
e759ddced2 | ||
|
|
1ad28d8515 | ||
|
|
3d36b11c8f | ||
|
|
a15df6d455 | ||
|
|
9f0488dc32 | ||
|
|
f3dba82b04 | ||
|
|
c999ce0787 | ||
|
|
5b76bf9552 | ||
|
|
9cf9b856b0 | ||
|
|
db6c142afd | ||
|
|
1e691b2470 | ||
|
|
c5555dd8cc | ||
|
|
78c14f81a8 |
2
LICENSE
2
LICENSE
@@ -1,5 +1,5 @@
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-2025 The Jasmine developers
|
||||
Copyright (c) 2008-2026 The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
||||
@@ -60,5 +60,5 @@ To find out what environments work with a particular Jasmine release, see the [r
|
||||
* Sheel Choksi
|
||||
|
||||
Copyright (c) 2008-2019 Pivotal Labs<br>
|
||||
Copyright (c) 2008-2025 The Jasmine developers<br>
|
||||
Copyright (c) 2008-2026 The Jasmine developers<br>
|
||||
This software is licensed under the [MIT License](https://github.com/jasmine/jasmine/blob/main/LICENSE).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-2025 The Jasmine developers
|
||||
Copyright (c) 2008-2026 The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-2025 The Jasmine developers
|
||||
Copyright (c) 2008-2026 The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-2025 The Jasmine developers
|
||||
Copyright (c) 2008-2026 The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
@@ -49,11 +49,16 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
env.configure(urls.configFromCurrentUrl());
|
||||
|
||||
window.addEventListener('load', function() {
|
||||
const currentWindowOnload = window.onload;
|
||||
window.onload = function() {
|
||||
if (currentWindowOnload) {
|
||||
currentWindowOnload();
|
||||
}
|
||||
|
||||
// The HTML reporter needs to be set up here so it can access the DOM. Other
|
||||
// reporters can be added at any time before env.execute() is called.
|
||||
const htmlReporter = new jasmine.HtmlReporterV2({ env, urls });
|
||||
env.addReporter(htmlReporter);
|
||||
env.execute();
|
||||
});
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-2025 The Jasmine developers
|
||||
Copyright (c) 2008-2026 The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2008-2019 Pivotal Labs
|
||||
Copyright (c) 2008-2025 The Jasmine developers
|
||||
Copyright (c) 2008-2026 The Jasmine developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
@@ -3870,7 +3870,7 @@ getJasmineRequireObj().deprecateMonkeyPatching = function(j$) {
|
||||
},
|
||||
set(newValue) {
|
||||
j$.getEnv().deprecated(
|
||||
'Monkey patching detected. This is not supported and will break in a future jasmine-core release.'
|
||||
'Monkey patching detected. Code that overwrites parts of Jasmine, except globala and other properties that are documented as writeable, is not supported and will break in a future release.'
|
||||
);
|
||||
value = newValue;
|
||||
}
|
||||
@@ -8961,7 +8961,6 @@ getJasmineRequireObj().reporterEvents = function(j$) {
|
||||
* {@link ReporterCapabilities} will apply.
|
||||
* @name Reporter#reporterCapabilities
|
||||
* @type ReporterCapabilities | undefined
|
||||
* @optional
|
||||
* @since 5.0
|
||||
*/
|
||||
/**
|
||||
@@ -9028,7 +9027,6 @@ getJasmineRequireObj().reporterEvents = function(j$) {
|
||||
/**
|
||||
* `specStarted` is invoked when an `it` starts to run (including associated `beforeEach` functions)
|
||||
* @function
|
||||
* @optional
|
||||
* @name Reporter#specStarted
|
||||
* @param {SpecStartedEvent} result Information about the individual {@link it} being run
|
||||
* @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on.
|
||||
@@ -9075,6 +9073,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} description Textual description of the group
|
||||
* @param {Function} specDefinitions Function for Jasmine to invoke that will define inner suites and specs
|
||||
*/
|
||||
@@ -9090,6 +9089,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} description Textual description of the group
|
||||
* @param {Function} specDefinitions Function for Jasmine to invoke that will define inner suites and specs
|
||||
*/
|
||||
@@ -9106,6 +9106,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.1.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} description Textual description of the group
|
||||
* @param {Function} specDefinitions Function for Jasmine to invoke that will define inner suites and specs
|
||||
*/
|
||||
@@ -9124,6 +9125,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} description Textual description of what this spec is checking
|
||||
* @param {implementationCallback} [testFunction] Function that contains the code of your test. If not provided the test will be `pending`.
|
||||
* @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async spec.
|
||||
@@ -9141,6 +9143,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} description Textual description of what this spec is checking.
|
||||
* @param {implementationCallback} [testFunction] Function that contains the code of your test. Will not be executed.
|
||||
*/
|
||||
@@ -9156,6 +9159,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.1.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} description Textual description of what this spec is checking.
|
||||
* @param {implementationCallback} testFunction Function that contains the code of your test.
|
||||
* @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async spec.
|
||||
@@ -9171,6 +9175,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {implementationCallback} [function] Function that contains the code to setup your specs.
|
||||
* @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async beforeEach.
|
||||
* @see async
|
||||
@@ -9185,6 +9190,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {implementationCallback} [function] Function that contains the code to teardown your specs.
|
||||
* @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async afterEach.
|
||||
* @see async
|
||||
@@ -9201,6 +9207,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.1.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {implementationCallback} [function] Function that contains the code to setup your specs.
|
||||
* @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async beforeAll.
|
||||
* @see async
|
||||
@@ -9217,6 +9224,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.1.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {implementationCallback} [function] Function that contains the code to teardown your specs.
|
||||
* @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async afterAll.
|
||||
* @see async
|
||||
@@ -9230,6 +9238,8 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @name getSpecProperty
|
||||
* @since 5.10.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} key The name of the property
|
||||
* @returns {*} The value of the property
|
||||
*/
|
||||
@@ -9242,6 +9252,8 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @name setSpecProperty
|
||||
* @since 3.6.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} key The name of the property
|
||||
* @param {*} value The value of the property
|
||||
*/
|
||||
@@ -9254,6 +9266,8 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @name setSuiteProperty
|
||||
* @since 3.6.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} key The name of the property
|
||||
* @param {*} value The value of the property
|
||||
*/
|
||||
@@ -9267,6 +9281,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} actual - Actual computed value to test expectations against.
|
||||
* @return {matchers}
|
||||
*/
|
||||
@@ -9283,6 +9298,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 3.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} actual - Actual computed value to test expectations against.
|
||||
* @return {async-matchers}
|
||||
* @example
|
||||
@@ -9309,8 +9325,8 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @name throwUnlessAsync
|
||||
* @since 5.1.0
|
||||
* @function
|
||||
* @param actual
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} actual - Actual computed value to test expectations against.
|
||||
* @return {matchers}
|
||||
*/
|
||||
@@ -9333,8 +9349,8 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @name throwUnless
|
||||
* @since 5.1.0
|
||||
* @function
|
||||
* @param actual
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} actual - Actual computed value to test expectations against.
|
||||
* @return {matchers}
|
||||
*/
|
||||
@@ -9348,6 +9364,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.0.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} [message] - Reason the spec is pending.
|
||||
*/
|
||||
pending: function() {
|
||||
@@ -9360,6 +9377,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.1.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String|Error} [error] - Reason for the failure.
|
||||
*/
|
||||
fail: function() {
|
||||
@@ -9372,6 +9390,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} obj - The object upon which to install the {@link Spy}.
|
||||
* @param {String} methodName - The name of the method to replace with a {@link Spy}.
|
||||
* @returns {Spy}
|
||||
@@ -9386,6 +9405,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.6.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} obj - The object upon which to install the {@link Spy}
|
||||
* @param {String} propertyName - The name of the property to replace with a {@link Spy}.
|
||||
* @param {String} [accessType=get] - The access type (get|set) of the property to {@link Spy} on.
|
||||
@@ -9401,6 +9421,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 3.2.1
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} obj - The object upon which to install the {@link Spy}s
|
||||
* @param {boolean} includeNonEnumerable - Whether or not to add spies to non-enumerable properties
|
||||
* @returns {Object} the spied object
|
||||
@@ -12385,5 +12406,5 @@ getJasmineRequireObj().UserContext = function(j$) {
|
||||
};
|
||||
|
||||
getJasmineRequireObj().version = function() {
|
||||
return '6.0.0-beta.0';
|
||||
return '6.0.0';
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jasmine-core",
|
||||
"license": "MIT",
|
||||
"version": "6.0.0-beta.0",
|
||||
"version": "6.0.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jasmine/jasmine.git"
|
||||
@@ -43,10 +43,10 @@
|
||||
"ejs": "^3.1.10",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-plugin-compat": "^6.0.2",
|
||||
"glob": "^10.2.3",
|
||||
"glob": "^13.0.0",
|
||||
"globals": "^16.0.0",
|
||||
"jasmine": "github:jasmine/jasmine-npm#6.0",
|
||||
"jasmine-browser-runner": "github:jasmine/jasmine-browser-runner#4.0",
|
||||
"jasmine": "github:jasmine/jasmine-npm",
|
||||
"jasmine-browser-runner": "github:jasmine/jasmine-browser-runner",
|
||||
"jsdom": "^26.0.0",
|
||||
"prettier": "1.17.1",
|
||||
"sass": "^1.58.3"
|
||||
|
||||
44
release_notes/5.13.0.md
Normal file
44
release_notes/5.13.0.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Jasmine Core 5.13.0 Release Notes
|
||||
|
||||
## Changes to supported environments
|
||||
|
||||
Safari 26 is now supported on a best-effort basis.
|
||||
|
||||
Due to the limited availability of Safari 18 and later on free CI services,
|
||||
Safari support in future jasmine-core versions will be limited to:
|
||||
|
||||
* Best-effort support for the latest Safari version available on GitHub Actions,
|
||||
which may change at any time.
|
||||
* Best-effort support for Safari 16 and 17 for as long as it remains practical.
|
||||
|
||||
## New Features
|
||||
|
||||
* New `extraItStackFrames` and `extraDescribeStackFrames` config options to fix
|
||||
the filename properties of reporter events in configurations that wrap
|
||||
`it`/`describe`, such as zone.js. The `filename` properties of reporter events
|
||||
are no longer deprecated.
|
||||
* `jasmine.allOf` asymmetric equality tester
|
||||
* Merges [#2087](https://github.com/jasmine/jasmine/issues/2083) from @jonahd-g
|
||||
* Fixes [#2083](https://github.com/jasmine/jasmine/pull/2087)
|
||||
|
||||
## Supported environments
|
||||
|
||||
This version has been tested in the following environments.
|
||||
|
||||
| Environment | Supported versions |
|
||||
|-------------|--------------------------------|
|
||||
| Node | 18.20.5**, 20, 22, 24 |
|
||||
| Safari** | 16, 17, 26.1 |
|
||||
| Chrome | 142* |
|
||||
| Firefox | 102**, 115**, 128**, 140, 145* |
|
||||
| Edge | 142* |
|
||||
|
||||
\* Evergreen browser. Each version of Jasmine is tested against the latest
|
||||
version available at release time.<br>
|
||||
\** Supported on a best-effort basis. Support for these versions may be dropped
|
||||
if it becomes impractical, and bugs affecting only these versions may not be
|
||||
treated as release blockers.
|
||||
|
||||
------
|
||||
|
||||
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
|
||||
47
release_notes/6.0.0-beta.1.md
Normal file
47
release_notes/6.0.0-beta.1.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Jasmine Core 6.0.0-beta.1 Release Notes
|
||||
|
||||
This is a pre-release, intended to offer a preview of upcoming changes and to
|
||||
solicit feedback.
|
||||
|
||||
A corresponding release of the `jasmine` package is not planned because the
|
||||
change in this release only affects browser users.
|
||||
|
||||
## A Note About Pre-Release Compatibility
|
||||
|
||||
There may be additional breaking changes in future 6.0 pre-releases or in the
|
||||
final 6.0 release. That's allowed by the semver specification, but users are
|
||||
sometimes unpleasantly surprised by it.
|
||||
|
||||
NPM's implementation of carat version ranges assumes that subsequent
|
||||
pre-releases and final releases are fully compatible with earlier pre-releases.
|
||||
If your package.json contains `"jasmine-core": "^6.0.0-beta.1`,
|
||||
NPM might install any later 6.x version even though there is no guarantee of
|
||||
compatibility. If that isn't ok, you should specify an exact pre-release version:
|
||||
`"jasmine-core": "6.0.0-beta.1`.
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
* Revert to using window.onload in boot1.js. This fixes top level await in
|
||||
jasmine-browser-runner.
|
||||
|
||||
## Supported environments
|
||||
|
||||
This version has been tested in the following environments.
|
||||
|
||||
| Environment | Supported versions |
|
||||
|-------------------|--------------------------------|
|
||||
| Node | 20, 22, 24 |
|
||||
| Safari** | 16, 17, 26.1 |
|
||||
| Chrome | 143* |
|
||||
| Firefox | 102**, 115**, 128**, 140, 145* |
|
||||
| Edge | 142* |
|
||||
|
||||
\* Evergreen browser. Each version of Jasmine is tested against the latest
|
||||
version available at release time.<br>
|
||||
\** Supported on a best-effort basis. Support for these versions may be dropped
|
||||
if it becomes impractical, and bugs affecting only these versions may not be
|
||||
treated as release blockers.
|
||||
|
||||
------
|
||||
|
||||
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
|
||||
190
release_notes/6.0.0.md
Normal file
190
release_notes/6.0.0.md
Normal file
@@ -0,0 +1,190 @@
|
||||
# Jasmine Core 6.0.0 Release Notes
|
||||
|
||||
## Summary
|
||||
|
||||
This is a major release that includes breaking changes as well as significant
|
||||
new features. Many of the breaking changes and deprecations in this release are
|
||||
intended to improve the stability of the Jasmine ecosystem by making the
|
||||
distinction between public and private APIs more obvious, reducing exposure of
|
||||
jasmine-core's internal state, removing ambiguities from the reporter API, and
|
||||
warning about monkey patching.
|
||||
|
||||
6.x is intended to ba a relatively short-lived, transitional series. It is
|
||||
compatible with the current versions of karam-jasmine and other legacy Angular
|
||||
tools but emits deprecation warnings when used with them. 7.0 will drop
|
||||
compatibility with those tools. If you use Karma in a non-Angular context,
|
||||
consider migrating to a maintained alternative such as jasmine-browser-runner or
|
||||
web-test-runner. If you use Angular, please direct any questions about support
|
||||
for future versions of Jasmine to the Angular team.
|
||||
|
||||
Please see the [migration guide](https://jasmine.github.io/upgrade-guides/6.0)
|
||||
for more information. If you use Jasmine via the `jasmine` package, please see
|
||||
[its release notes](https://github.com/jasmine/jasmine-npm/blob/main/release_notes/6.0.0.md)
|
||||
as well.
|
||||
|
||||
|
||||
## Changes to supported environments
|
||||
|
||||
* Node 18 is no longer supported.
|
||||
|
||||
|
||||
## Breaking changes
|
||||
|
||||
### General
|
||||
|
||||
* Private APIs have been removed from the `jasmine` namespace.
|
||||
|
||||
The purpose of this change is to reduce the risk of users inadvertently
|
||||
depending on private APIs. Anything not covered by
|
||||
[the documentation](https://jasmine.github.io/pages/docs_home.html) remains
|
||||
private regardless of namespacing. Private APIs may be changed or removed in
|
||||
any release. This change is being made in a major release as a courtesy to
|
||||
users of libraries that depend on private APIs.
|
||||
|
||||
### Changes that affect spec writing
|
||||
|
||||
* Global error spies always receive a single argument. Previously, the browser
|
||||
error event was passed as the second argument.
|
||||
* If a spy is invoked via `.call(null, ...)` or `.apply(null, ...)`, the spy's
|
||||
`this` argument will be `null`. Previously it was `globalThis`.
|
||||
* Mock clock timing functions cannot be spied on. Previously this "worked" but
|
||||
prevented the mock clock from uninstalling itself.
|
||||
* The mock clock no longer supports the eval forms of `setTimeout` and
|
||||
`setInterval`.
|
||||
* Keys passed to `setSpecProperty`/`setSuiteProperty` must be strings. Values
|
||||
must be both structured-cloneable and JSON-serializable.
|
||||
|
||||
### Changes that affect configuration
|
||||
|
||||
* HTML reporters cache configuration throughout each run. Configuration changes
|
||||
made while specs are running will not affect reporter behavior.
|
||||
* If an execution order is passed to `Env#execute`, it must not enter any suite
|
||||
more than once.
|
||||
* The argument passed to spec filters is a
|
||||
[spec metadata](https://jasmine.github.io/api/6.0/Spec.html)
|
||||
instance, not the internal spec object.
|
||||
* The default value of the `forbidDuplicateNames` config option has been
|
||||
changed to true.
|
||||
|
||||
### Changes that affect reporters
|
||||
|
||||
This release includes changes that are intended to streamline and clarify the
|
||||
reporter interface, prevent sharing of mutable state, and prevent bugs involving
|
||||
non-serializable objects. These changes should be compatible with most existing
|
||||
reporters but could break reporters that manage their internal state in unusual
|
||||
ways.
|
||||
|
||||
* Meaningless properties such as `status` and `failedExpectations` are omitted
|
||||
from the events passed to [suiteStarted](https://jasmine.github.io/api/6.0/global.html#SuiteStartedEvent)
|
||||
and [specStarted](https://jasmine.github.io/api/6.0/global.html#SpecStartedEvent).
|
||||
* Reporter events are deep-cloned before being passed to each reporter. This
|
||||
protects reporters against later mutation by jasmine-core or other reporters.
|
||||
* The `expected` and `actual` properties of
|
||||
[passed and failed expectations](https://jasmine.github.io/api/6.0/global.html#ExpectationResult)
|
||||
have been removed.
|
||||
* The [order](https://jasmine.github.io/api/6.0/global.html#Order)
|
||||
property of the`jasmineStarted` and `jasmineDone` reporter events no longer
|
||||
includes undocumented properties.
|
||||
* boot1.js no longer adds `jsApiReporter` to the env.
|
||||
|
||||
### Changes that affect browser boot files
|
||||
|
||||
* The `createElement` and `createTextNode` options of the legacy `HtmlReporter`
|
||||
are ignored. `HtmlReporter` now unconditionally uses `document.createElement`
|
||||
and `document.createTextNode`.
|
||||
|
||||
### Changes to Node boot functions
|
||||
|
||||
* [boot](https://jasmine.github.io/api/6.0/module-jasmine-core.html#.boot)
|
||||
defaults to creating a new core instance each time it's called. This restores
|
||||
the pre-5.0 default behavior.
|
||||
* [noGlobals](https://jasmine.github.io/api/6.0/module-jasmine-core.html#.noGlobals)
|
||||
no longer takes a parameter. It always returns the same object when called
|
||||
repeatedly.
|
||||
|
||||
|
||||
## New features
|
||||
|
||||
* A new `HtmlReporterV2` with several improvements over the old `HtmlReporter`:
|
||||
* Clicking a spec/suite link does exact filtering rather than a substring
|
||||
match.
|
||||
* The old dots are replaced with a progress bar. This improves usability with
|
||||
large suites and fixes an accessibility problem.
|
||||
* Details of failed specs are displayed as soon as each spec finishes.
|
||||
* A Performance tab shows metrics and a list of the slowest specs.
|
||||
* Initialization and wire-up in boot files are much simpler.
|
||||
|
||||
If you're using jasmine-browser-runner or copying boot1.js from the standalone
|
||||
distribution, you'll automatically get the new reporter. If you maintain your
|
||||
own boot files, you'll get the old reporter unless you update your boot files
|
||||
to match the one that's in this package.
|
||||
|
||||
The new reporter produces `spec` query string parameters that are different
|
||||
from those created by the old reporter. If you use other software that
|
||||
interprets the `spec` parameter, such as karma-jasmine, you won't be able to
|
||||
adopt `HtmlReporterV2` unlesss that other software is updated.
|
||||
|
||||
* Larger body font size in HTML reporters
|
||||
* `globalThis` is used to determine the global object during initialization
|
||||
This makes jasmine-core more tolerant of buggy bundlers or loaders that
|
||||
cause `this` to be undefined in the global context.
|
||||
* Experimental [`safariYieldStrategy: "time"`](https://jasmine.github.io/api/6.0/Configuration.html#safariYieldStrategy)
|
||||
config option, which may make Jasmine run significantly faster in Safari and
|
||||
similar browsers. So far, this option has not been tested on a wide variety of
|
||||
workloads. Feedback is appreciated.
|
||||
* Statically exposed pretty printer as `jasmine.pp()`.
|
||||
|
||||
|
||||
## Deprecations
|
||||
|
||||
* Common monkey patching patterns are detected and result in a deprecation
|
||||
warning. Code that overwrites anything provided by jasmine-core (other than
|
||||
globals like `it`/`expect`/etc or configuration properties like
|
||||
`jasmine.DEFAULT_TIMEOUT_INTERVAL`) may be broken by any jasmine-core release.
|
||||
* Warn if jasmine-core is loaded as an ES module in a browser.
|
||||
This is an untested and unsupported configuration that has been known to cause
|
||||
problems.
|
||||
* `HtmlReporter` and `HtmlSpecFilter` are deprecated in favor of `HtmlReporterV2`.
|
||||
* `jsApiReporter` is deprecated.
|
||||
|
||||
|
||||
## Documentation improvements
|
||||
|
||||
* Improved API reference documentation for APIs that are used from browser boot
|
||||
files.
|
||||
* Documented the set of possible spec statuses.
|
||||
* Documented that globals are overwriteable.
|
||||
|
||||
|
||||
## Internal improvements
|
||||
|
||||
* Encapsulated suite and spec result and status management.
|
||||
* Adopted strict mode throughout the codebase.
|
||||
* Decomposed `HtmlReporter` into components and converted to ES6 classes.
|
||||
* Made global error handling more uniform between browsers and Node.
|
||||
* Removed code to support browsers that don't have `MessageChannel`. Jasmine
|
||||
hasn't run in any such browsers since 2.x.
|
||||
* Replaced `isArray` helper with native `Array.isArray`.
|
||||
|
||||
## Supported environments
|
||||
|
||||
This version has been tested in the following environments.
|
||||
|
||||
| Environment | Supported versions |
|
||||
|-------------------|--------------------------------|
|
||||
| Node | 20, 22, 24 |
|
||||
| Safari** | 16, 17, 26.2 |
|
||||
| Chrome | 143* |
|
||||
| Firefox | 102**, 115**, 128**, 140, 147* |
|
||||
| Edge | 143* |
|
||||
|
||||
\* Evergreen browser. Each version of Jasmine is tested against the latest
|
||||
version available at release time.<br>
|
||||
\** Supported on a best-effort basis. Support for these versions may be dropped
|
||||
if it becomes impractical, and bugs affecting only these versions may not be
|
||||
treated as release blockers.
|
||||
|
||||
|
||||
------
|
||||
|
||||
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
|
||||
@@ -44,8 +44,8 @@ else
|
||||
fi
|
||||
run_browser firefox 102
|
||||
|
||||
run_browser safari 17
|
||||
run_browser safari 16
|
||||
# run_browser safari 17
|
||||
# run_browser safari 16
|
||||
|
||||
run_browser MicrosoftEdge latest
|
||||
|
||||
|
||||
@@ -768,7 +768,16 @@ describe('matchersUtil', function() {
|
||||
a2[0] = 1;
|
||||
const diffBuilder = new privateUnderTest.DiffBuilder();
|
||||
expect(matchersUtil.equals(a1, a2, diffBuilder)).toBe(false);
|
||||
jasmine.debugLog('Diff: ' + diffBuilder.getMessage());
|
||||
jasmine.debugLog(
|
||||
'a1 keys: ' + jasmine.pp(privateUnderTest.MatchersUtil.keys(a1))
|
||||
);
|
||||
jasmine.debugLog(
|
||||
'a2 keys: ' + jasmine.pp(privateUnderTest.MatchersUtil.keys(a2))
|
||||
);
|
||||
jasmine.debugLog('a1 length:' + a1.length);
|
||||
jasmine.debugLog('a2 length:' + a2.length);
|
||||
jasmine.debugLog('a1[0]: ' + a1[0]);
|
||||
jasmine.debugLog('a2[0]: ' + a2[0]);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -25,11 +25,16 @@
|
||||
*/
|
||||
env.configure(urls.configFromCurrentUrl());
|
||||
|
||||
window.addEventListener('load', function() {
|
||||
const currentWindowOnload = window.onload;
|
||||
window.onload = function() {
|
||||
if (currentWindowOnload) {
|
||||
currentWindowOnload();
|
||||
}
|
||||
|
||||
// The HTML reporter needs to be set up here so it can access the DOM. Other
|
||||
// reporters can be added at any time before env.execute() is called.
|
||||
const htmlReporter = new jasmine.HtmlReporterV2({ env, urls });
|
||||
env.addReporter(htmlReporter);
|
||||
env.execute();
|
||||
});
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -11,7 +11,7 @@ getJasmineRequireObj().deprecateMonkeyPatching = function(j$) {
|
||||
},
|
||||
set(newValue) {
|
||||
j$.getEnv().deprecated(
|
||||
'Monkey patching detected. This is not supported and will break in a future jasmine-core release.'
|
||||
'Monkey patching detected. Code that overwrites parts of Jasmine, except globala and other properties that are documented as writeable, is not supported and will break in a future release.'
|
||||
);
|
||||
value = newValue;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ getJasmineRequireObj().reporterEvents = function(j$) {
|
||||
* {@link ReporterCapabilities} will apply.
|
||||
* @name Reporter#reporterCapabilities
|
||||
* @type ReporterCapabilities | undefined
|
||||
* @optional
|
||||
* @since 5.0
|
||||
*/
|
||||
/**
|
||||
@@ -74,7 +73,6 @@ getJasmineRequireObj().reporterEvents = function(j$) {
|
||||
/**
|
||||
* `specStarted` is invoked when an `it` starts to run (including associated `beforeEach` functions)
|
||||
* @function
|
||||
* @optional
|
||||
* @name Reporter#specStarted
|
||||
* @param {SpecStartedEvent} result Information about the individual {@link it} being run
|
||||
* @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on.
|
||||
|
||||
@@ -20,6 +20,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} description Textual description of the group
|
||||
* @param {Function} specDefinitions Function for Jasmine to invoke that will define inner suites and specs
|
||||
*/
|
||||
@@ -35,6 +36,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} description Textual description of the group
|
||||
* @param {Function} specDefinitions Function for Jasmine to invoke that will define inner suites and specs
|
||||
*/
|
||||
@@ -51,6 +53,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.1.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} description Textual description of the group
|
||||
* @param {Function} specDefinitions Function for Jasmine to invoke that will define inner suites and specs
|
||||
*/
|
||||
@@ -69,6 +72,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} description Textual description of what this spec is checking
|
||||
* @param {implementationCallback} [testFunction] Function that contains the code of your test. If not provided the test will be `pending`.
|
||||
* @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async spec.
|
||||
@@ -86,6 +90,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} description Textual description of what this spec is checking.
|
||||
* @param {implementationCallback} [testFunction] Function that contains the code of your test. Will not be executed.
|
||||
*/
|
||||
@@ -101,6 +106,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.1.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} description Textual description of what this spec is checking.
|
||||
* @param {implementationCallback} testFunction Function that contains the code of your test.
|
||||
* @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async spec.
|
||||
@@ -116,6 +122,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {implementationCallback} [function] Function that contains the code to setup your specs.
|
||||
* @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async beforeEach.
|
||||
* @see async
|
||||
@@ -130,6 +137,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {implementationCallback} [function] Function that contains the code to teardown your specs.
|
||||
* @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async afterEach.
|
||||
* @see async
|
||||
@@ -146,6 +154,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.1.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {implementationCallback} [function] Function that contains the code to setup your specs.
|
||||
* @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async beforeAll.
|
||||
* @see async
|
||||
@@ -162,6 +171,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.1.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {implementationCallback} [function] Function that contains the code to teardown your specs.
|
||||
* @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async afterAll.
|
||||
* @see async
|
||||
@@ -175,6 +185,8 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @name getSpecProperty
|
||||
* @since 5.10.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} key The name of the property
|
||||
* @returns {*} The value of the property
|
||||
*/
|
||||
@@ -187,6 +199,8 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @name setSpecProperty
|
||||
* @since 3.6.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} key The name of the property
|
||||
* @param {*} value The value of the property
|
||||
*/
|
||||
@@ -199,6 +213,8 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @name setSuiteProperty
|
||||
* @since 3.6.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} key The name of the property
|
||||
* @param {*} value The value of the property
|
||||
*/
|
||||
@@ -212,6 +228,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} actual - Actual computed value to test expectations against.
|
||||
* @return {matchers}
|
||||
*/
|
||||
@@ -228,6 +245,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 3.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} actual - Actual computed value to test expectations against.
|
||||
* @return {async-matchers}
|
||||
* @example
|
||||
@@ -254,8 +272,8 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @name throwUnlessAsync
|
||||
* @since 5.1.0
|
||||
* @function
|
||||
* @param actual
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} actual - Actual computed value to test expectations against.
|
||||
* @return {matchers}
|
||||
*/
|
||||
@@ -278,8 +296,8 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @name throwUnless
|
||||
* @since 5.1.0
|
||||
* @function
|
||||
* @param actual
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} actual - Actual computed value to test expectations against.
|
||||
* @return {matchers}
|
||||
*/
|
||||
@@ -293,6 +311,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.0.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String} [message] - Reason the spec is pending.
|
||||
*/
|
||||
pending: function() {
|
||||
@@ -305,6 +324,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.1.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {String|Error} [error] - Reason for the failure.
|
||||
*/
|
||||
fail: function() {
|
||||
@@ -317,6 +337,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 1.3.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} obj - The object upon which to install the {@link Spy}.
|
||||
* @param {String} methodName - The name of the method to replace with a {@link Spy}.
|
||||
* @returns {Spy}
|
||||
@@ -331,6 +352,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 2.6.0
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} obj - The object upon which to install the {@link Spy}
|
||||
* @param {String} propertyName - The name of the property to replace with a {@link Spy}.
|
||||
* @param {String} [accessType=get] - The access type (get|set) of the property to {@link Spy} on.
|
||||
@@ -346,6 +368,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
|
||||
* @since 3.2.1
|
||||
* @function
|
||||
* @global
|
||||
* @overwritable
|
||||
* @param {Object} obj - The object upon which to install the {@link Spy}s
|
||||
* @param {boolean} includeNonEnumerable - Whether or not to add spies to non-enumerable properties
|
||||
* @returns {Object} the spied object
|
||||
|
||||
Reference in New Issue
Block a user