Commit graph

84 commits

Author SHA1 Message Date
matthewlucock
1486d41b96 Assertions to test if objects are sealed 2015-07-12 22:57:26 +10:00
matthewlucock
4c7926f5f0 Assertions to test if objects are extensible 2015-07-12 22:56:15 +10:00
root
3048c06f00 Assert ifError now throws the error passed in, to keep it consistent with node's assert.ifError 2015-05-29 20:37:29 +01:00
⅕ Zander
91f57e9598 Add tests for undefined property error 2015-05-29 02:16:22 -04:00
root
da2ec4a1d4 No longer using eval on assert operator #386 2015-03-08 13:18:49 -04:00
Chris Polis
051fd95d88 cleaned out .by for #333 2015-01-02 10:13:44 -08:00
Chris Polis
cb1c33b5d8 updated change to work w/ non-number values + tests 2014-12-29 09:45:25 -08:00
Chris Polis
be67119616 assert tests for change,increase,decrease 2014-12-27 17:13:22 -08:00
Chris Jones
e3e170d3e0 Fixes issue #291, adds assert.sameDeepMembers 2014-12-02 19:38:07 -05:00
Chris Jones
e8e8caf4c2 Issue #305 fixed, added assert.isAbove and assert.isBelow 2014-11-29 01:52:00 -05:00
Jake Luer
834fd5b0dd Merge pull request #268 from charlierudolph/cr-lazyMessages
Allow messages to be functions
2014-09-29 18:18:25 -04:00
mohayonao
11fe70ef82 assert: .closeTo() verify value's type before assertion 2014-07-16 09:50:45 +09:00
charlierudolph
216ad26aa1 Allow messages to be functions 2014-06-08 14:00:42 -07:00
Jake Luer
c3c1fccc2d assert: .throws() returns thrown error. Closes #185 2014-01-29 17:22:29 -05:00
Jake Luer
b01eba75c9 assert: .fail() parameter mismatch. Closes #206 2014-01-29 16:23:04 -05:00
Jake Rosoman
2715e95abc support {a:1,b:2}.should.include({a:1}) 2014-01-05 14:10:14 +13:00
Andrei Neculau
b1c7d710a4 test: add tests for throwing custom errors 2013-10-23 23:48:48 +02:00
Andrei Neculau
e174212d0f test: updated for the new assertion errors 2013-10-23 23:06:39 +02:00
Jake Luer
a8f94bdcbb test: [karma] use karma phantomjs runner
- tests refactored as bdd instead of tdd
- removed test/browser bootstraps
- add karma-runner
2013-09-17 17:22:36 -04:00
Bartvds
774a723bff replaced tabs with 2 spaces 2013-06-09 01:31:26 +02:00
Bartvds
080702ac87 added assert.notOk() 2013-06-08 18:16:44 +02:00
George Kats
044dcff68d Fix comparison objects.
Regexp and Date objects can to be deep equal to objects with the same type.
2013-06-06 00:53:34 +03:00
George Kats
2c4da4a91a Add test for different RegExp flags. 2013-06-05 23:26:42 +03:00
George Kats
f62eb19a66 Add test for regexp comparison. 2013-06-05 02:14:53 +03:00
Jake Luer
019bb07637 assert: [(not)include] throw on incompatible haystack. Closes #142 2013-04-29 19:30:51 -04:00
Jake Luer
8f8d7425a5 assert: [notInclude] add assert.notInclude. Closes #158 2013-04-29 19:03:53 -04:00
Jake Luer
30784962da Merge branch 'master' of github.com:chaijs/chai
* 'master' of github.com:chaijs/chai:
  giving members a no-flag assertion
  Code review comments - changing syntax
  Code review comments
  Adding members and memberEquals assertions for checking for subsets and set equality. Implements chaijs/chai#148.
  Restore the `call` and `apply` methods of Function when adding a chainable method.
2013-04-29 17:18:34 -04:00
Jake Luer
e5e3a4fa42 test: [assert] deep equal ordering 2013-04-29 17:18:22 -04:00
Nick Heiner
22e2a78a4e Code review comments - changing syntax 2013-04-14 19:07:12 -04:00
Nick Heiner
078da00be3 Adding members and memberEquals assertions for checking for subsets and set equality. Implements chaijs/chai#148. 2013-04-14 17:58:07 -04:00
Jake Luer
4db0b20c57 test: for ever err() there must be a passing version 2013-02-04 19:28:26 -05:00
Jake Luer
6ccbd03780 tests: refactor some tests to support new objDisplay output 2013-02-03 18:03:40 -05:00
DD
91d2805393 Fix issue #137, test message existence by using message!=null rather than using message 2013-02-03 00:49:48 +08:00
Domenic Denicola
0fe68b021c Use inherited enumerable properties in deep equality comparison.
Fixes #120.
2012-12-30 06:26:26 -05:00
Edwin Shao
f438d37e44 TST: assert.Throw should check error type/message
Currently, assert.Throw will not take into account the expected
error type or message passed in. Write tests to document this.
2012-11-30 19:37:12 +08:00
Jake Luer
86fe576d56 convert tests to use new bootstrap 2012-11-29 03:18:48 -05:00
Chris Connelly
3d05feee32 Added support for circular references when checking deep (in)equality. 2012-10-21 22:15:49 +01:00
Scott Nonnenberg
941f992a26 Increasing Throws error message verbosity
'cause we actually want to know what was thrown.
2012-09-04 23:13:44 -07:00
Jake Luer
19fe54399b add closeTo assertion to assert interface. Closes #89. 2012-08-01 20:21:52 -04:00
Victor Costan
f269726e9c Don't inspect() assertion arguments if the assertion passes. 2012-07-19 02:09:14 -07:00
domenic
8cd580d7f2 Make error message for eql/deep.equal more clear. 2012-05-27 17:34:27 -04:00
domenic
554944f82f Fixing "an" vs. "a" grammar in type assertions.
Now says stuff like "expected x to be an array" instead of "expected x to be a array."
2012-05-18 14:05:06 -04:00
domenic
ae3be8c684 Don't use instanceof for assert.isArray.
This makes it more compatible with cross-frame checks.
2012-05-18 14:00:46 -04:00
domenic
4a938ef672 Add deep flag for equality and property value.
See #63 for more discussion.

Also adds to the assert interface:
 - deepProperty
 - notDeepProperty
 - deepPropertyVal
 - deepPropertyNotVal
2012-05-17 10:13:19 -04:00
Jake Luer
d49436ccc9 assert test conformity for minor refactor api 2012-05-09 19:16:42 -04:00
Jake Luer
aa3d84aab6 missing assert tests for ownProperty 2012-05-06 07:22:29 -04:00
Jake Luer
943b7569bd assert match/notMatch tests 2012-05-04 17:55:11 -04:00
Jake Luer
0a8ddc452f moved almostEqual / almostDeepEqual to stats plugin 2012-05-04 17:55:11 -04:00
Jake Luer
ee2050abaa Merge pull request #54 from josher19/master
Added almostEqual to assert test suite.
2012-04-23 21:07:36 -07:00
josher19
19c1fb1b9c Added almostEqual and deepAlmostEqual to assert test suite. 2012-04-23 13:56:44 +08:00