Jasmine Core 6.0.0-alpha.0 Release Notes
This is a pre-release, intended to offer a preview of breaking changes and to solicit feedback.
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-alpha.0,
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-alpha.0.
Changes to supported environments
- Node 18 is no longer supported.
Breaking changes
General
-
Private APIs have been removed from the
jasminenamespace.The purpose of this change is to reduce the risk of users inadvertently depending on private APIs. Anything that’s 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.
-
Arguments to
setSpecProperty/setSuitePropertymust be both structured-cloneable and JSON-serializable. -
Mock clock timing functions cannot be spied on. Previously this “worked” but prevented the mock clock from uninstalling itself.
-
The default value of the
forbidDuplicateNamesconfig option has been changed to true. -
The mock clock no longer supports the eval forms of
setTimeoutandsetInterval. -
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 instance, not the internal spec object.
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. Please open an issue if you find a published reporter package that works with jasmine-core 5.x but not with this release.
- Irrelevant properties such as
statusandfailedExpectationsare omitted from the event passed to specStarted. - Reporter events are deep-cloned before being passed to each reporter. This protects reporters against later mutation by jasmine-core or other reporters.
- The
expectedandactualproperties of passed and failed expectations have been removed. - The order
property of the
jasmineStartedandjasmineDonereporter events no longer includes undocumented properties.
Changes to Node boot functions
- boot defaults to creating a new core instance each time it’s called. This restores the pre-5.0 default behavior.
- noGlobals no longer takes a parameter. It always returns the same object when called repeatedly.
Supported environments
This version has been tested in the following environments.
| Environment | Supported versions |
|---|---|
| Node | 20, 22, 24 |
| Safari | 16**, 17** |
| Chrome | 140* |
| Firefox | 102**, 115**, 128**, 140, 143* |
| Edge | 140* |
* 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