Commit Graph

2739 Commits

Author SHA1 Message Date
Steve Gravrock 89151d6e64 Dropped Safari 13 from build matrix 2021-12-07 17:04:19 -08:00
Steve Gravrock 75e3e14861 Merge remote-tracking branch 'upstream/safari-15' into 4.0 2021-12-07 17:03:40 -08:00
Steve Gravrock ce7460d8d4 Fixed stack trace filtering on Safari 15 2021-12-07 16:50:07 -08:00
Steve Gravrock b8dabf96ff HTML: Include top suite failures in the reported failure count 2021-12-03 08:18:18 -08:00
Steve Gravrock 40fac8b6a2 Renamed the trace feature to debugLog[s]
"trace" was ambiguous and could easily be understood to have something
to do with stack traces.
2021-12-02 14:46:56 -08:00
Steve Gravrock 5eb42d67a7 Added a note about async testing style to contributing guide 2021-12-02 12:40:14 -08:00
Steve Gravrock d739c23401 Resolve the promise returned by Env#execute to the overall status 2021-12-02 12:40:14 -08:00
Steve Gravrock 42e6c45efa Allow use without creating globals
* Fixes #1235
2021-11-29 20:37:07 -08:00
Steve Gravrock 5942654856 Merge branch '3.99' into 4.0 2021-11-26 13:27:57 -08:00
Steve Gravrock f3b26a0688 Merge branch 'main' into 3.99 2021-11-26 13:25:14 -08:00
Steve Gravrock 8804ddb8cf Updated boot file lists for the Ruby gem and Python egg
This prevents consumers that rely on those lists (especially the Jasmine
gem and egg) from getting a deprecation warning about boot.js.
2021-11-24 15:38:40 -08:00
Steve Gravrock 439be97c34 Rephrased note about verboseDeprecations 2021-11-24 11:45:32 -08:00
Steve Gravrock 871ba99a30 Allow custom spy strategies to be inherited like other runnable resources 2021-11-17 12:50:16 -08:00
Steve Gravrock 7a685b16f6 Removed duplicate message from errors (incl. matcher failures) on V8 2021-11-16 12:52:07 -08:00
Steve Gravrock 2a049015b0 Use custom equality testers in Spy#withArgs
Fixes #1836.
2021-11-15 18:55:09 -08:00
Steve Gravrock c48fb0b0e7 Added Firefox 91 (current ESR) to CI matrix 2021-11-14 14:18:06 -08:00
Steve Gravrock 4c47bf6c0b Merge branch '3.10.1' into main 2021-10-22 16:34:57 -07:00
Steve Gravrock e86a7f00a6 Bump version to 3.10.1 v3.10.1 2021-10-22 16:15:54 -07:00
Jan Molak 504ef27899 Fixed result.pendingReason for specs marked with xit. Closes #1939 2021-10-22 14:12:28 -07:00
Steve Gravrock 2a39339755 Merge branch 'fix/pending-reason' of https://github.com/jan-molak/jasmine into main
* Fixes missing pendingReason in pending spec results
	* Fixes #1939
	* Merges #1940 from @jan-molak
2021-10-22 14:09:48 -07:00
Jan Molak 2c440b8e44 Fixed result.pendingReason for specs marked with xit. Closes #1939 2021-10-22 17:58:31 +01:00
Steve Gravrock 8e74529631 Merge branch '3.99' into 4.0 2021-10-15 10:37:51 -07:00
Steve Gravrock b13329114c Set version to 3.99.0-dev 2021-10-15 10:33:21 -07:00
Steve Gravrock ab34f272da Merge branch 'main' into 3.99 2021-10-15 10:29:50 -07:00
Steve Gravrock 1af0e62ef7 Revert "Revert "Dogfood the new jasmine-npm completion interface""
This reverts commit 4c043717a9.
2021-10-14 07:07:10 -07:00
Steve Gravrock 572452a15a Added supported environments to 3.10.0 release notes 2021-10-13 16:47:48 -07:00
Steve Gravrock 896412367a Bump version to 3.10.0 v3.10.0 2021-10-13 15:46:21 -07:00
Steve Gravrock 503a7409f0 Merge branch 'issue-1854-asyncerror' of https://github.com/AndreWillomitzer/jasmine into main
* Improves error message when an async expectation occurs after the spec
  finishes
* Merges #1937 from @AndreWillomitzer
* Fixes #1854
2021-10-12 17:15:53 -07:00
Steve Gravrock c1db8f2f82 Clarified deprecation message for this in describes 2021-10-12 15:40:13 -07:00
Andre Willomitzer bb9175cb66 added additional error msg for delayedExpectation
added matching error msgs in jasmine objects

Ran prettier.

removed indenting, formatted column length < 80
2021-10-12 13:17:24 -04:00
Steve Gravrock 41f5c53959 Consistently identify clenaup fns by a type tag, not position
This was already done for everything except spec cleanup fns, since the
various skip policies need to know the difference between afterEach and
afterAll.
2021-10-11 18:05:57 -07:00
Steve Gravrock 25c3f06839 Run afterAll fns after failure even if stopOnSpecFailure is true
[#160905297]
2021-10-08 14:19:56 -07:00
Steve Gravrock 976928c7ae Set version to 4.0.0-pre.0 2021-10-08 08:48:22 -07:00
Steve Gravrock 36a4ddf433 Revert "Removed jsdoc entry for SpecResult#trace"
This reverts commit 4482355885.
2021-10-07 10:56:52 -07:00
Steve Gravrock 53b1cd37b6 Merge branch '3.99' into 4.0 2021-10-07 10:56:41 -07:00
Steve Gravrock 8cadfbd829 Fixed deprecation warning in spec 2021-10-07 10:51:06 -07:00
Steve Gravrock 86aeb5c88a Merge branch 'main' into 3.99 2021-10-07 10:38:35 -07:00
Steve Gravrock 469b557828 Merge branch 'fix/ie' of https://github.com/nicojs/jasmine into main
* Merges #1936 from @nicojs
2021-10-07 10:17:16 -07:00
Nico Jansen 503715c275 test(ie): refactor promises to callbacks 2021-10-07 10:23:52 +02:00
Steve Gravrock d4c15b8df4 No longer test Node <12.17 2021-10-06 17:58:28 -07:00
Steve Gravrock 6f0c51260f Depend on the 4.0 branch of -npm 2021-10-06 17:54:54 -07:00
Steve Gravrock 4482355885 Removed jsdoc entry for SpecResult#trace
Deferred to 4.0.
2021-10-06 11:31:29 -07:00
Steve Gravrock 6542364381 Merge branch 'feat/support-multiple-runs' of https://github.com/nicojs/jasmine into main
* Merges #1934 from @nicojs
* Fixes #1925
2021-10-06 11:20:34 -07:00
Nico Jansen 1fc911e0fa Support running jasmine multiple times
Add support for running jasmine multiple times.

```js
const Jasmine = require('jasmine');

async function main() {
  const jasmine = new Jasmine({ projectBaseDir: process.cwd() });
  let specId = 'spec0';
  jasmine.loadConfigFile('./spec/support/jasmine.json');
  jasmine.env.configure({
    specFilter(sp) {
      return sp.id === specId;
    },
    autoCleanClosures: false
  });
  jasmine.exit = () => {};
  await jasmine.execute();
  specId = 'spec2';
  await jasmine.execute();
}

main().catch((err) => {
  console.error(err);
  process.exitCode = 1;
});
```

With `jasmine.env.configure({ autoCleanClosures: false })` you disable Jasmine's feature to automatically clean closures (functions) during the test run. This is a requirement to be able to rerun.

When `execute` is called more than once, the `topSuite.reset` is called, which will reset the state for the next run as well as reset any child suites.

Add a function `exclude` to the `Suite` and `Spec` clases. This functions similar to `pend`, but will allow the "pending" state to persist over multiple runs. This is useful when `xit` is used.

Revert changes to jasmine.js

fix: make sure to call hooks during second run

Remove jsdoc from private apis

Fix elint issue

Add new line
2021-10-06 20:12:45 +02:00
Steve Gravrock 15710937b8 Added a test that verifies skip to cleanup fns after pending()
Because pending() is implemented via the standard exception handling
path, we effectively got this feature for free as a result of the changes
for #1533, particularly 457a2727.

* [#178598493]
* Fixes #1579
2021-10-06 11:07:53 -07:00
Steve Gravrock 1a9d16715d Clarify which behaviors are specific to different stopSpecOnExpectationFailure values
* #1533
2021-10-06 08:55:01 -07:00
Steve Gravrock b67a3043c7 Skip afterEach fns in nested suites when a beforeEach fn errors
This matches the behavior of beforeAll errors.

* #1533
2021-10-06 08:55:01 -07:00
Steve Gravrock 5f1ef5ac2b Skip everything except afterAll fns when a beforeAll fn errors
* Fixes #1533
2021-10-06 08:55:01 -07:00
Steve Gravrock 5eaeeb0b6c Moved fn skipping policy out of QueueRunner
This should allow us to more easily support complex skipping strategies
like skipping nested cleanup fns when the corresponding befores were
skipped, or skipping specs and suites when a beforeAll fails.

* #1533
2021-10-06 08:55:01 -07:00
Steve Gravrock 457a2727ba Skip to afterEach fns when a beforeEach fn errors
* #1533
2021-10-06 08:55:01 -07:00