Commit Graph

210 Commits

Author SHA1 Message Date
Stephan Ferlin-Reiter 6f23e706d7 Improve the error message of the toHaveSize matcher.
We include the size of the thing that didn't meet the size expectation.
2024-07-02 20:28:16 +00:00
Steve Gravrock 39f9c2e1a0 Don't attach spec helpers to the env 2023-08-26 11:52:26 -07:00
Steve Gravrock a5f79fac81 Removed remaining jshint config comments 2022-06-02 18:22:23 -07:00
Steve Gravrock 751cf6ab5b Converted DiffBuilder, ObjectPath, MismatchTree, and SinglePrettyPrintRun to ES6 classes 2022-05-14 11:15:08 -07:00
Steve Gravrock 81f6eb45ea Cleaned up specs for symbol property filtering
* Removed redundant spec
* Test the behavior of jasmineUnderTest, not the host jasmine
2022-05-09 17:11:36 -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 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
suke dfa94c70c1 toEqual does not compare symbols that cannot be enumerated 2022-04-27 10:51:03 +09: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 fb639d0f55 toBeCloseTo treats Infinity and -Infinity as close to themselves
* Fixes #1957
2022-04-09 11:14:24 -07: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 a8a6577cd7 Replace parameterized test with different expectations
This approach makes it hard to scale and goes against DRY and debuggability vs the previous approach which followed Python parameterized testing, but this was the recommendation of the Jasmine team to keep it consistent with other tests.

Further tests here could be adding other types like Array, Map, WeakMap, Set, WeakSet...
2022-03-17 20:16:22 +08:00
Nito Buendia 1660015c12 Run formatter 2022-03-16 23:01:20 +08:00
Nito Buendia 00fd4a819f Refactor tests to depend on jasmineUnderTest 2022-03-16 21:48:03 +08:00
Nito Buendia 091cd8c3b6 Remove spyObj setup from test that does not require it 2022-03-16 21:34:28 +08:00
Nito Buendia aba0c98eb9 Fix unit test to include testValue instead of a constant value 2022-03-16 21:31:40 +08:00
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 7b01003d0b Add specs for the new toHaveSpyInteractions matcher 2022-02-16 21:11:42 +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 42e6c45efa Allow use without creating globals
* Fixes #1235
2021-11-29 20:37:07 -08:00
Steve Gravrock c73df57720 MatchersUtil#contains uses deep equality rather than === for set members
[#169001712]
2021-07-24 14:23:05 -07:00
Steve Gravrock fe0a83ba87 Removed support for Internet Explorer 2021-07-23 21:46:15 -07:00
Steve Gravrock 9b3d4a2bf2 Merge branch '3.99' into 4.0 2021-07-10 09:13:28 -07:00
Steve Gravrock 17826cd044 Fixed deprecations in matchersUtilSpec 2021-07-10 09:11:10 -07:00
Steve Gravrock 6cb9507f62 Merge branch 'main' into 3.99 2021-07-10 08:58:14 -07:00
Steve Gravrock 3e64ce3310 Removed property tests for MatchersUtil#equals
These might be useful for a function with a more restricted domain. But for
equals, which accepts two of literally anything, the short run was too short
to catch any problems and the long run tended to exceed the CircleCi timeout.
2021-07-03 08:37:15 -07:00
Steve Gravrock 5862b22aef Include rejection details in failure messages for toBeResolved and toBeResolvedWith
[#178559119]
2021-06-21 16:43:51 -07:00
Steve Gravrock 0aee81cfb9 Remvoed checks for typed array support in the test suite
All supported browsers have all typed arrays except for Uint8ClampedArray,
BigInt64Array, and BigUint64Array.
2021-06-05 13:31:26 -07:00
Steve Gravrock 1e50b49092 Fixed test failures on IE 10 2021-06-05 13:13:46 -07:00
Steve Gravrock 6aecf16cde Test coverage for MatchersUtil#equals with typed arrays 2021-06-05 12:03:11 -07:00
Steve Gravrock c2a714f168 Removed support for IE 10 and Safari 8 2021-04-23 08:14:19 -07:00
Steve Gravrock 235efe52f1 Fixed test failure in IE 2021-04-22 22:43:48 -07:00
Steve Gravrock 4b2a14f1f3 Removed deprecated custom matcher, matchersUtil, pp, etc interfaces 2021-04-22 22:29:20 -07:00
Steve Gravrock 8b3a6561b1 Merge branch 'main' into 3.99 2021-04-02 11:35:30 -07:00
Surgie Finesse 37073e2768 Fix the review notices 2021-03-22 19:26:33 +10:00
Surgie Finesse f7f928fdd3 Merge remote-tracking branch 'upstream/main' into array_buffer
# Conflicts:
#	spec/core/matchers/matchersUtilSpec.js
2021-03-22 18:33:50 +10:00
leoni laetitia 3234d475cd expect...toEqual check for Symbols 2021-01-31 22:32:58 +01:00
Yasin Kocak 3f5c47dff3 expect all truthy and falsy 2021-01-02 10:55:14 +01:00
Steve Gravrock 89331bb1bb Fixed comparison between URL objects
* Fixes #1866
2020-11-21 13:47:44 -08:00
Steve Gravrock d27bb8fa96 Run Prettier on all files 2020-09-29 18:05:38 -07:00
Steve Gravrock 7d5ca27b9d Check for forgotten console and debugger statements 2020-09-17 13:33:25 -07:00
Steve Gravrock a1f1b4ae0f Merge branch 'main' into 3.99 2020-09-14 18:39:32 -07:00
Steve Gravrock 6b9739030d Fixed future deprecations 2020-08-02 12:57:28 -07:00