Commit Graph

1222 Commits

Author SHA1 Message Date
Steve Gravrock 5f3475342e Re-added missing JasmineStartedInfo jsdoc 2022-08-06 10:53:28 -07:00
Steve Gravrock 21f25972bb Converted ReportDispatcher to promises 2022-07-01 17:25:22 -07:00
Steve Gravrock 6c56ebc984 Added jasmine.spyOnGlobalErrorsAsync
* Allows testing code that's expected to prodeuce global errors or
  unhandled promise rejections
* Fixes #1843
* Fixes #1453
2022-06-30 18:09:56 -07:00
Steve Gravrock d0a9931ae6 Separated reporter- and runable-specific queue runner configuration 2022-06-12 15:52:14 -07:00
Steve Gravrock 93c5f654d9 Extracted most suite-running code out of Env 2022-06-12 15:46:03 -07:00
Steve Gravrock d8b65028a1 Pass queue runner factory to Spec#execute, not ctor 2022-06-12 12:34:46 -07:00
Steve Gravrock d6cdc1841c Extracted suite building out of Env 2022-06-12 09:49:01 -07:00
Steve Gravrock 72b39220e5 Runable, not runnable 2022-06-11 15:41:29 -07:00
Steve Gravrock 55dce7d119 Extracted runnable resource management out of Env 2022-06-11 15:28:37 -07:00
Steve Gravrock 96000220b1 Use arrow fns rather than self = this 2022-06-11 12:12:11 -07:00
Steve Gravrock e2e2275d41 Removed obsolete and unused utility fns 2022-06-11 11:17:16 -07:00
Steve Gravrock 135ff20123 Replaced uses of var with const/let 2022-06-09 20:00:23 -07:00
Steve Gravrock bcf69b86b4 Removed duplicate Suite and Spec jsdocs 2022-06-03 12:22:58 -07:00
Steve Gravrock a5f79fac81 Removed remaining jshint config comments 2022-06-02 18:22:23 -07:00
Steve Gravrock 4cc8437f79 Call buildExpectationResult directly from Suite and Spec
This removes quite a bit of indirection from result processing, at the
cost of making a few of the tests more awkward.
2022-06-01 10:18:23 -07:00
Steve Gravrock 8e58305b0a ExpectationResult.js -> buildExpectationResult.js 2022-06-01 09:26:21 -07:00
Steve Gravrock bd368aceee Replaced var with const and let in expectation related code 2022-06-01 09:22:03 -07:00
Steve Gravrock 8f16021887 Replaced var with const and let in ExpectationResult 2022-06-01 09:02:43 -07:00
Steve Gravrock bbb1b69b2e More reliably report errors that occur late in the suite/spec lifecycle
Previously, an error that occurred after Jasmine started to report the
suiteDone or specDone event for the current runable would not be reliably
reported. Now such an error is reported on the nearest ancestor suite whose
suiteDone event has not yet been reported.
2022-05-28 18:10:55 -07:00
Steve Gravrock 41f7fabe2f Renamed jasmine.exactly to jasmine.is, for similarity with toBe 2022-05-21 08:30:53 -07:00
Steve Gravrock 0c87d47318 Added a jasmine.exactly asymmetric equality tester 2022-05-14 17:01:38 -07:00
Steve Gravrock 774c83a36e Don't report a deprecation when a runnable uses two forms of async
This was made into an error in 4.0, so the deprecation is redundant
(and broken).
2022-05-14 11:21:40 -07:00
Steve Gravrock 751cf6ab5b Converted DiffBuilder, ObjectPath, MismatchTree, and SinglePrettyPrintRun to ES6 classes 2022-05-14 11:15:08 -07:00
Steve Gravrock 2fd76c954c Replaced var with let and const in PrettyPrinter, DiffBuilder, and friends 2022-05-14 09:42:07 -07:00
Steve Gravrock bb4d18f959 Include property getter values in pretty-printed objects
We already call getters when comparing objects for equality and generating
diffs, so it should be safe to do it here too.

See #1966.
2022-05-12 17:14:13 -07:00
Steve Gravrock 841b212c66 Merge branch 'patch-1' of https://github.com/suke/jasmine
* Merges #1963 from @suke
* Excludes non-enumerable symbol properties from equality comparison
2022-05-09 16:51:47 -07:00
Steve Gravrock 9a27407d35 Folded util.objectDifference into MatchersUtil
This was always an implementation detail of objectKeysAreDifferentFormatter,
and didn't really do what its name suggested.

* #1966
2022-05-07 14:03:26 -07:00
Steve Gravrock 468e9577cd Include symbol properties in matcher diffs
* #1966
2022-05-07 13:26:15 -07:00
Steve Gravrock 9d80377fe3 Fixed exception when comparing arrays with Symbol keys
* Fixes #1966
2022-05-07 10:42:29 -07:00
Steve Gravrock 270344bd38 Include symbol keys when pretty-printing objects
* Fixes #1966
2022-05-07 10:05:18 -07:00
suke dfa94c70c1 toEqual does not compare symbols that cannot be enumerated 2022-04-27 10:51:03 +09:00
Steve Gravrock 04133264e0 Bump version to 4.1.0 2022-04-11 20:24:42 -07:00
Steve Gravrock fb639d0f55 toBeCloseTo treats Infinity and -Infinity as close to themselves
* Fixes #1957
2022-04-09 11:14:24 -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 d2815982ce Removed obsolete vendor-specific background-size rules
* Fixes #1961
2022-03-29 07:20:02 -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 c5db939886 Run cleanup 2022-03-17 21:09:14 +08:00
Nito Buendia e470fb56d7 Refactor error message to account for negate comparisons
The message return on negate clause was not expected. This makes it negative to match expectation. This also add tests for the change, and renames some tests to make it more clear.
2022-03-17 21:06:51 +08:00
Nito Buendia 1660015c12 Run formatter 2022-03-16 23:01:20 +08:00
Nito Buendia faf210ab4c Remove dependency on matchersUtil for test 2022-03-16 23:00:27 +08:00
Nito Buendia b2c2e08641 Remove @since tag from JSDoc 2022-03-16 20:15:09 +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 8e85f3df74 Create toHaveSpyInteractions matcher
This matcher checks all the properties of a given spy object and checks whether at least one of the spies has been called. It returns true if one or more of the spies of the spy object has been called and false otherwise.
2022-02-16 21:10:31 +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