Commit Graph

118 Commits

Author SHA1 Message Date
Gregg Van Hove 11b0d95a7d Merge branch 'enelson/toBeInstanceOf' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/toBeInstanceOf
- Merges #1697 from @elliot-nelson
2019-05-16 17:35:09 -07:00
Elliot Nelson 0fded24d35 Introduce matchers#toBeInstanceOf 2019-05-15 11:51:46 -04:00
Alexey Prokhorov 8ab46566ac Fix failure messages for toBeRejectedWithError matcher 2019-05-03 09:37:11 +04:00
Alexey Prokhorov 35968e4a60 Add toBeRejectedWithError matcher 2019-04-26 01:46:56 +04:00
Gregg Van Hove 2fbeb201bc Fix failure messages for positive/negative infinity matchers
- Fixes #1674
2019-04-16 17:40:07 -07:00
Gregg Van Hove b994a17039 Merge branch 'FelixRilling-boolean-matcher'
- Merges #1679 from @FelixRilling
2019-04-15 17:48:49 -07:00
Felix Rilling 369e810791 added #toBeTrue and #toBeFalse matchers 2019-04-14 10:17:59 +02:00
Gregg Van Hove eba8c775f3 update npm dependencies 2019-01-08 17:47:53 -08:00
Sampo Kivistö a81e9626df Fixes issue where PhantomJS 2 and IE 10 - 11 crashed when reporting SVG element equality 2018-11-04 10:31:33 +02:00
Gregg Van Hove 1e47dcf2cc Pull async matchers out to their own functions
- Makes AsyncExpectation closer to Expectation
2018-10-23 16:02:31 -07:00
Gregg Van Hove 3c47e71619 Also show tip for .not cases 2018-10-22 10:57:16 -07:00
Teagan Durtschi 7cbedcdda7 Add custom message for toBe() matcher when object equality check fails 2018-10-21 12:46:49 -04:00
Gregg Van Hove ced2b114e4 Better detection of DOM Nodes for equality
- Also use JSDom if a real one isn't present to get some more coverage
  there

- Fixes #1172
2018-05-04 18:01:08 -07:00
Majid Razvi 11b8b59e03 Change message for extra elements at end of actual array. #1485 2018-03-10 00:05:07 -07:00
sylhare 7fb53dcdfa Fixing missing semi-colons 2018-02-21 09:01:24 -05:00
Steve Gravrock 11827572d3 Moved toHaveClass matcher into core so that it can be used in Karma
- Fixes #1503
2018-02-13 17:09:42 -08:00
Gregg Van Hove 274011ed03 Merge branch 'master' into 3.0-features 2018-02-02 16:33:38 -08:00
Gregg Van Hove 91aab8e1b8 Merge branch 'Volox-ie11-sets-support'
- Merges #1478 from @Volox
- Fixes #1355
2018-01-12 17:33:51 -08:00
Volonterio Riccardo 486a64658f Added complete support for Set also for IE11.
Fixes 1355
2018-01-12 12:18:35 +01:00
Gregg Van Hove 1dfdc89ba9 Merge branch 'ie11-maps-support' of https://github.com/Volox/jasmine into Volox-ie11-maps-support
- Merges #1477 from @Volox
- Fixes #1472
2018-01-11 17:50:56 -08:00
Volonterio Riccardo 085a1f8a16 Added complete support for Map also for IE11.
Fixes 1472
2018-01-11 18:13:24 +01:00
Steve Gravrock 6f119c4e5a Moved createSpy to env so it can be stateful 2018-01-09 10:16:02 -08:00
Steve Gravrock ac5d8708b9 More informative pretty-printing of DOM elements
[Finishes ##153562618]
2017-12-11 08:25:13 -08:00
Steve Gravrock 9619acf91f Extracted the predicate version of toThrowError into its own matcher
This simplifies the signature of each matcher to something that jsdoc
can actually handle.

[Finishes #20622765]
2017-11-28 14:30:06 -08:00
Steve Gravrock b0ec95c472 Merge branch 'master' into 3.0-features 2017-11-10 10:26:14 -08:00
Steve Gravrock a42f28c734 Removed checks for PhantomJS 1
v2 has been out for a long time, and v1 can no longer be easily installed.
2017-11-09 07:04:06 -08:00
Steve Gravrock 419470e9df Removed support for IE <10
[#150527985]
2017-11-08 08:30:22 -08:00
Steve Gravrock 285f06d5c4 Merge branch 'promise-matching-1314' of https://github.com/sderickson/jasmine 2017-11-02 17:18:24 -07:00
Benjamin Mularczyk b4dfdd7a48 Fix equality computation for ES6 Sets. 2017-11-01 01:01:26 +01:00
Steve Gravrock 12ed3bfacd Allow use of a predicate function to validate thrown exceptions
[Finishes #20622765]
2017-10-30 08:51:25 -07:00
Zaven Muradyan 89306551a0 Add some unit tests that exercise jasmine.anything() and Map matching.
Follow-up to some recent commits that fixed issues around
jasmine.anything() matching. This simply adds some extra tests that
exercise usage of Symbols with jasmine.anything() and as Map keys.
2017-10-24 22:39:31 -07:00
Zaven Muradyan 6d3953356d Add special handling of asymmetric matcher objects as keys in Maps.
The previous Map equality code was assuming that the set of keys would
be identical between the two Maps. This change adds insertion-order
tracking for each key with its corresponding key. If one of the two keys
is an asymmetric equality obj, the keys are eq()'d, and if it succeeds,
the corresponding values are compared. Otherwise, the "main" key is
looked up directly in the other object; this is to prevent
similar-looking obj keys with different obj identities from comparing
equal.

Fixes #1432.
2017-10-23 23:01:50 -07:00
ksvitkovsky e7049d3183 Add 'nothing' matcher and tests 2017-08-09 16:44:19 +04:00
Gilberto Stankiewicz 090a6234c3 Make toEqual matcher report the difference between array elements when arrays have different length 2017-08-08 09:55:17 -07:00
ksvitkovsky 1db81c334d Ensure no message added on asym. match success 2017-08-04 10:26:51 -07:00
ksvitkovsky 4fc177d5ae Better pretty printing for typed arrays 2017-08-04 09:33:05 -07:00
Sébastien Cevey fc6ee243e9 Rewrite ES6 Set and Map comparison to ignore insertion order 2017-08-02 15:22:33 +01:00
Scott Erickson 6ddf64568e Add Promise checking to eq
Fixes #1314
2017-06-26 19:10:19 -07:00
Pierre Vanduynslager c604012793 Fix rounding in toBeCloseTo 2017-06-25 16:59:24 -04:00
Beat Richartz 271908a2c4 Fail when one of the arguments passed into toBeCloseTo matcher is null 2017-06-02 15:36:39 +01:00
rmehlinger 5ee03f02ed Add ES6 map support to Jasmine 2017-05-01 00:12:48 -07:00
Sean Parmelee ef3cfe7f44 skip the test when we can’t get the propertyDescriptor 2017-04-25 12:27:32 -05:00
Sean Parmelee 0d6ecbec17 iterate through keys with a regular for loop 2017-04-25 11:28:16 -05:00
Thodoris Bais 08f046c24c Added infinity methods, with tests 2017-03-27 00:04:43 +02:00
Gregg Van Hove 75e652d6a7 Cleanup toThrowError constructor lookup to work in older IE
- Also use the existing browser detection for phantom
2017-03-14 14:26:17 -07:00
Gregg Van Hove e1f7ca51da Merge branch 'issue-1252' of https://github.com/anseki/jasmine into anseki-issue-1252
- Merges #1275 from @anseki
- Fixes #1252
2017-03-10 14:36:22 -08:00
Damien Cassou c93f35fbc8 fixup! Add toHaveBeenCalledBefore matcher 2017-02-20 10:55:23 +01:00
Damien Cassou 4cfdd06700 Add toHaveBeenCalledBefore matcher
This matcher makes sure the 'actual' spy is called before the
'expected' spy.

This code has been written in cooperation with Benjamin Van Ryseghem.
2017-02-20 09:52:14 +01:00
anseki 19b89d437e Skip a spec in PhantomJS that has bugs about iframe 2017-02-16 14:50:24 +09:00
anseki ed23254865 fix #1252 2017-02-10 17:17:39 +09:00