Compare commits
5 Commits
v6.0.0-alp
...
v5.12.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18d4d38655 | ||
|
|
53e9bc68d2 | ||
|
|
2be50e1b87 | ||
|
|
27a1257b6d | ||
|
|
9a67c4e24d |
@@ -11514,7 +11514,10 @@ getJasmineRequireObj().TreeRunner = function(j$) {
|
||||
_executeSpec(spec, specOverallDone) {
|
||||
const onStart = next => {
|
||||
this.#currentRunableTracker.setCurrentSpec(spec);
|
||||
this.#runableResources.initForRunable(spec.id, spec.parentSuiteId);
|
||||
this.#runableResources.initForRunable(
|
||||
spec.id,
|
||||
spec.parentSuiteId || this.#executionTree.topSuite.id
|
||||
);
|
||||
this.#reportDispatcher.specStarted(spec.result).then(next);
|
||||
};
|
||||
const resultCallback = (result, next) => {
|
||||
@@ -11788,5 +11791,5 @@ getJasmineRequireObj().UserContext = function(j$) {
|
||||
};
|
||||
|
||||
getJasmineRequireObj().version = function() {
|
||||
return '5.12.0';
|
||||
return '5.12.1';
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jasmine-core",
|
||||
"license": "MIT",
|
||||
"version": "5.12.0",
|
||||
"version": "5.12.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jasmine/jasmine.git"
|
||||
|
||||
29
release_notes/5.12.1.md
Normal file
29
release_notes/5.12.1.md
Normal file
@@ -0,0 +1,29 @@
|
||||
Jasmine Core 5.12.1 Release Notes
|
||||
|
||||
## Bug fixes
|
||||
|
||||
* Fix custom matchers in top-level specs
|
||||
* Merges [#2088](https://github.com/jasmine/jasmine/pull/2088) from @bonkevin
|
||||
|
||||
## Supported environments
|
||||
|
||||
This version has been tested in the following environments.
|
||||
|
||||
| Environment | Supported versions |
|
||||
|-------------|--------------------------------|
|
||||
| Node | 18.20.5**, 20, 22, 24 |
|
||||
| Safari | 16**, 17** |
|
||||
| Chrome | 141* |
|
||||
| Firefox | 102**, 115**, 128**, 140, 144* |
|
||||
| Edge | 141* |
|
||||
|
||||
\* 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)_
|
||||
116
release_notes/6.0.0-alpha.1.md
Normal file
116
release_notes/6.0.0-alpha.1.md
Normal file
@@ -0,0 +1,116 @@
|
||||
# Jasmine Core 6.0.0-alpha.1 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.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-alpha.1`.
|
||||
|
||||
|
||||
## Breaking changes
|
||||
|
||||
### Changes that affect reporters
|
||||
|
||||
* Irrelevant properties such as `status` and `failedExpectations` are omitted
|
||||
from [the event passed to suiteStarted](https://jasmine.github.io/api/6.0.0-alpha.1/global.html#SuiteStartedEvent).
|
||||
|
||||
This change should be compatible with most existing reporters but could break
|
||||
reporters that manage their internal state in unusual ways. Please
|
||||
[open an issue](https://github.com/jasmine/jasmine/issues/new?template=bug_report.yml)
|
||||
if you find a published reporter package that works with jasmine-core 5.x but
|
||||
not with this release.
|
||||
|
||||
### Changes that affect browser boot files
|
||||
|
||||
* The `createElement` and `createTextNode` options of `HtmlReporter` are ignored.
|
||||
`HtmlReporter` now unconditionally uses `document.createElement` and
|
||||
`document.createTextNode`.
|
||||
|
||||
### Changes that affect spec writing
|
||||
|
||||
* HTML reporters cache configuration throughout each run. Configuration changes
|
||||
made while specs are running will not affect reporter behavior.
|
||||
* Global error spies always receive a single argument. Previously, the browser
|
||||
error event was passed as the second argument.
|
||||
|
||||
## 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.
|
||||
* 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 boot1.js
|
||||
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 non-Jasmine software that
|
||||
interprets the `spec` parameter, such as karma-jasmine, you may not be able to
|
||||
adopt `HtmlReporterV2` unlesss it's updated.
|
||||
* Use `globalThis` 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.
|
||||
|
||||
|
||||
## Deprecations
|
||||
|
||||
* 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 in the past.
|
||||
* Deprecated `HtmlReporter` and `HtmlSpecFilter` in favor of `HtmlReporterV2`.
|
||||
|
||||
|
||||
## Documentation improvements
|
||||
|
||||
* Improved API reference documentation for APIs that are used from browser boot
|
||||
files.
|
||||
|
||||
|
||||
## Internal improvements
|
||||
|
||||
* Removed remaining code that supported suite re-entry.
|
||||
* 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.
|
||||
|
||||
|
||||
## Supported environments
|
||||
|
||||
This version has been tested in the following environments.
|
||||
|
||||
| Environment | Supported versions |
|
||||
|-------------------|--------------------------------|
|
||||
| Node | 20, 22, 24 |
|
||||
| Safari | 16**, 17** |
|
||||
| Chrome | 141* |
|
||||
| Firefox | 102**, 115**, 128**, 140, 143* |
|
||||
| Edge | 141* |
|
||||
|
||||
\* 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)_
|
||||
@@ -2277,6 +2277,34 @@ describe('Env integration', function() {
|
||||
await env.execute();
|
||||
});
|
||||
|
||||
it('Custom matchers set in top-level beforeAll should be available to all specs and suites', async function() {
|
||||
const matchers = {
|
||||
toFoo: function() {}
|
||||
};
|
||||
|
||||
env.beforeAll(function() {
|
||||
env.addMatchers(matchers);
|
||||
});
|
||||
|
||||
env.describe('suite - top-level', function() {
|
||||
env.it('has access to the custom matcher', function() {
|
||||
expect(env.expect().toFoo).toBeDefined();
|
||||
});
|
||||
|
||||
env.describe('suite - nested', function() {
|
||||
env.it('has access to the custom matcher', function() {
|
||||
expect(env.expect().toFoo).toBeDefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
env.it('spec - top-level - has access to the custom matcher', function() {
|
||||
expect(env.expect().toFoo).toBeDefined();
|
||||
});
|
||||
|
||||
await env.execute();
|
||||
});
|
||||
|
||||
it('throws an exception if you try to create a spy outside of a runnable', async function() {
|
||||
const obj = { fn: function() {} };
|
||||
let exception;
|
||||
|
||||
@@ -47,7 +47,10 @@ getJasmineRequireObj().TreeRunner = function(j$) {
|
||||
_executeSpec(spec, specOverallDone) {
|
||||
const onStart = next => {
|
||||
this.#currentRunableTracker.setCurrentSpec(spec);
|
||||
this.#runableResources.initForRunable(spec.id, spec.parentSuiteId);
|
||||
this.#runableResources.initForRunable(
|
||||
spec.id,
|
||||
spec.parentSuiteId || this.#executionTree.topSuite.id
|
||||
);
|
||||
this.#reportDispatcher.specStarted(spec.result).then(next);
|
||||
};
|
||||
const resultCallback = (result, next) => {
|
||||
|
||||
Reference in New Issue
Block a user