release_notes/6.0.0.md
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 karma-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
for more information. If you use Jasmine via the jasmine package, please see
its release notes
as well.
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 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.
.call(null, ...) or .apply(null, ...), the spy's
this argument will be null. Previously it was globalThis.setTimeout and
setInterval.setSpecProperty/setSuiteProperty must be strings. Values
must be both structured-cloneable and JSON-serializable.Env#execute, it must not enter any suite
more than once.forbidDuplicateNames config option has been
changed to true.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.
status and failedExpectations are omitted
from the events passed to suiteStarted
and specStarted.expected and actual properties of
passed and failed expectations
have been removed.jasmineStarted and jasmineDone reporter events no longer
includes undocumented properties.jsApiReporter to the env.createElement and createTextNode options of the legacy HtmlReporter
are ignored. HtmlReporter now unconditionally uses document.createElement
and document.createTextNode.A new HtmlReporterV2 with several improvements over the old HtmlReporter:
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"
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().
it/expect/etc or configuration properties like
jasmine.DEFAULT_TIMEOUT_INTERVAL) may be broken by any jasmine-core release.HtmlReporter and HtmlSpecFilter are deprecated in favor of HtmlReporterV2.jsApiReporter is deprecated.HtmlReporter into components and converted to ES6 classes.MessageChannel. Jasmine
hasn't run in any such browsers since 2.x.isArray helper with native Array.isArray.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.
** 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