Steve Gravrock
856a040a2d
Fixed flaky spec
2022-05-19 16:39:48 -07:00
Steve Gravrock
c24b2f5a73
Converted some integration specs to async/await
2022-05-14 12:05:53 -07:00
Steve Gravrock
1166d10e43
Use const/let in specs, not var
2022-04-16 13:41:44 -07:00
Steve Gravrock
482dc883eb
Check for unused vars and params in specs
2022-04-16 10:58:25 -07:00
Steve Gravrock
52b1a3a7f8
Merge branch 'refactor/rm-deprecated-substr' of https://github.com/CommanderRoot/jasmine
...
* Merges #1962 from @CommanderRoot
2022-04-02 10:32:59 -07:00
Steve Gravrock
a6e1aef8d7
Added debug logging to flaky spec
2022-03-29 20:57:49 -07:00
Tobias Speicher
aa979277fb
refactor: replace deprecated String.prototype.substr()
...
.substr() is deprecated so we replace it with functions which work similarily but aren't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com >
2022-03-25 16:03:46 +01:00
Nito Buendia
7b01003d0b
Add specs for the new toHaveSpyInteractions matcher
2022-02-16 21:11:42 +08:00
Steve Gravrock
5327157832
Always run formerly flaky specs
2022-01-17 14:54:21 -08:00
Steve Gravrock
c431590d65
Fixed reporting of suites that are skipped due to a beforeAll failure
2021-12-20 13:39:24 -08:00
Steve Gravrock
0b1385c3d3
Report start and end events for specs/suites that are skipped due to a beforeAll error
...
This is noisier, but it maintains compatibility with reporters that assume
(quite reasonably) that all specs and suites are either filtered out or
reported.
2021-12-11 12:34:23 -08:00
Steve Gravrock
f1cf6ee419
Resolve the execute() promise to the entire JasmineDoneInfo
...
This matches jasmine-npm.
2021-12-09 18:18:36 -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
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
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
8e74529631
Merge branch '3.99' into 4.0
2021-10-15 10:37:51 -07:00
Steve Gravrock
ab34f272da
Merge branch 'main' into 3.99
2021-10-15 10:29:50 -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
25c3f06839
Run afterAll fns after failure even if stopOnSpecFailure is true
...
[#160905297 ]
2021-10-08 14:19:56 -07:00
Steve Gravrock
53b1cd37b6
Merge branch '3.99' into 4.0
2021-10-07 10:56:41 -07:00
Steve Gravrock
86aeb5c88a
Merge branch 'main' into 3.99
2021-10-07 10:38:35 -07:00
Nico Jansen
503715c275
test(ie): refactor promises to callbacks
2021-10-07 10:23:52 +02: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
457a2727ba
Skip to afterEach fns when a beforeEach fn errors
...
* #1533
2021-10-06 08:55:01 -07:00
Steve Gravrock
a1f14efac6
Improved specs for stopSpecOnExpectationFailure
...
* #1533
2021-10-06 08:55:01 -07:00
Steve Gravrock
47081258cd
Revert "Revert "Added the ability to associate trace information with failing specs""
...
This reverts commit fdad8849df .
2021-10-02 09:56:25 -07:00
Steve Gravrock
fdad8849df
Revert "Added the ability to associate trace information with failing specs"
...
Pushing this back to 4.0 in hopes of increasing the chance that third
party reporters will notice it and add support.
This reverts commit 7a289f1de7 .
2021-10-02 09:45:15 -07:00
Steve Gravrock
7a289f1de7
Added the ability to associate trace information with failing specs
...
This is meant to aid in debugging failures, particularly intermittent
failures, in cases where interactive debugging or console.log aren't
suitable.
2021-09-25 16:19:28 -07:00
Steve Gravrock
1332f01ca4
Merge branch '3.99' into 4.0
2021-09-23 16:08:44 -07:00
Steve Gravrock
497a7fc3e5
Merge branch 'main' into 3.99
2021-09-23 15:49:47 -07:00
Steve Gravrock
e3c9a59c6c
Added a stringContaining asymmetric equality tester
...
* Fixes #1923 .
2021-09-22 11:28:24 -07:00
Steve Gravrock
8d302d8dca
Merge branch '3.99' into 4.0
2021-09-20 15:57:37 -07:00
Steve Gravrock
6e10f22403
Don't display late errors as AfterAll errors in the HTML reporter
2021-09-11 08:57:50 -07:00
Steve Gravrock
d092a59bd1
Treat multiple calls to done callbacks as errors
2021-09-10 18:07:35 -07:00
Steve Gravrock
af5984d5d6
Fixed flake list
2021-09-10 17:53:59 -07:00
Steve Gravrock
15f7013f85
Merge branch '3.99' into 4.0
2021-09-08 21:04:10 -07:00
Steve Gravrock
be23836c9d
Deprecate multiple calls to done callbacks
2021-09-08 20:58:25 -07:00
Steve Gravrock
7944250290
Merge branch 'main' into 3.99
2021-09-06 17:39:28 -07:00
Steve Gravrock
3a47a3bd04
Fixed flaky spec
2021-09-06 15:35:37 -07:00
Steve Gravrock
a63b0b0368
Merge branch '3.99' into 4.0
2021-08-30 18:44:32 -07:00
Steve Gravrock
2fd9d7b13f
Merge branch 'main' into 3.99
2021-08-17 17:08:34 -07:00
Steve Gravrock
e72d161fab
Return a promise from Env#execute in environments that support promises
...
[#178373231 ]
2021-08-07 13:05:55 -07:00
Steve Gravrock
d8862aa583
Removed the failFast and oneFailurePerSpec config properties
2021-07-31 09:28:14 -07:00