Nito Buendia
a7eff79db0
Simplify test for arguments passed
2022-03-16 21:26:59 +08:00
Nito Buendia
2a5673e6ab
Change jasmine to jasmineUnderTest
2022-03-16 21:20:21 +08:00
Nito Buendia
c13dd26c4b
Change set up to each of the formats
...
This goes against DRY principle, but it was recommended by Jasmine team to reduce coupling between tests.
2022-03-16 21:18:25 +08:00
Nito Buendia
2e8b477489
Change arrow functions with anonymous functions
2022-03-16 21:14:43 +08:00
Nito Buendia
d7d75abc42
Rename spec to include Spec to allow running
2022-03-16 20:14:06 +08:00
Nito Buendia
0b71d0a2a0
Merge branch 'jasmine:main' into main
2022-03-16 20:09:19 +08:00
Steve Gravrock
dfa5b6a53d
Pretty-print [new String("")] as "[ '' ]" not "[]"
2022-03-14 18:47:23 -07:00
Steve Gravrock
502cb24bb8
Merge branch '4.0.1'
2022-02-21 17:08:11 -08:00
Steve Gravrock
38d102f1d1
Merge branch '3.99.1' into 4.0.1
2022-02-21 16:45:34 -08:00
Steve Gravrock
9d9e8f0c17
Lint fixes
2022-02-19 12:33:19 -08:00
Steve Gravrock
4059ab7ba6
Don't report a deprecation when a promise is resolved to something
...
beforeEach(() => somePromiseReturningFn()) is likely a common idiom
and we don't want to treat it as an error.
* Fixes #1958
2022-02-19 12:28:47 -08:00
Nito Buendia
7b01003d0b
Add specs for the new toHaveSpyInteractions matcher
2022-02-16 21:11:42 +08:00
Steve Gravrock
b0034797fe
Merge branch 'fix-save-args-by-value' of https://github.com/coyoteecd/jasmine
...
* Fixes cloning of Date objects in saveArgumentsByValue()
* Merges #1955 from @coyoteecd
* Fixes #1885
2022-02-02 21:18:38 -08:00
Dan Cortel
83e9f88952
Make saveArgumentsByValue clone Date objects correctly
...
* Fixes #1885
2022-01-26 18:32:05 +02:00
Steve Gravrock
9e10743a1c
Include the name of the suite in the empty suite error message
2022-01-17 15:08:56 -08:00
Steve Gravrock
5327157832
Always run formerly flaky specs
2022-01-17 14:54:21 -08:00
Steve Gravrock
6e3128c792
Merge branch 'SymboltoEqual' of https://github.com/laeleoni/jasmine
...
* Merges #1879 from @laeleoni
* Fixes #1879
2022-01-15 11:44:53 -08:00
Steve Gravrock
d963be5eec
Log a deprecation warning on reentrant calls to Clock#tick
...
See #1929
2021-12-31 11:38:01 -08:00
Steve Gravrock
8444faab72
Use the clock from jasmineUnderTest in specs
2021-12-31 10:00:14 -08:00
James Bromwell
c56631175f
Fix time-travel in delayed function scheduler
2021-12-29 17:50:48 +01: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
57c294b307
Added a migration guide link to multiple done call deprecations
2021-12-14 08:16:06 -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
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
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
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
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
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
ab34f272da
Merge branch 'main' into 3.99
2021-10-15 10:29:50 -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
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
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