Commit graph

503 commits

Author SHA1 Message Date
Patrick Kovach-Long
d6d4f7d0ab Update assertions.js
removed 'out of range' reference error
2015-11-02 08:05:59 -05:00
Keith Cirkel
71b2512a99 chai@3.4.0 2015-10-21 11:49:38 +01:00
Bertrand Marron
8c1d8cf932 Revert .empty assertion change from PR #499
The change introduced in #499 breaks compatibility with Array-like
objects (e.g. mongoose arrays).
It should be applied in the next major version.

Fix #537
2015-10-21 12:29:04 +02:00
Droogans
b474ceee54 feat(matchers): Allow for objects in oneOf 2015-10-15 15:02:43 -05:00
Droogans
179d4701b8 feat(matchers): Add value-in-list assertion
Adds a way to test if a value appears in a flat list. Compliments
`include.members` to reverse the order of the input. Now the list
appears in the assertion, as opposed to the `expect`.

Closes #532
2015-10-12 22:18:24 -05:00
Xue Hu
7c14c15dee Fix assert lengthOf example 2015-10-05 16:19:36 -07:00
root
7fe23e9799 Added approximately alias to close to 2015-10-04 01:49:25 -04:00
Keith Cirkel
7f5a108a28 Merge pull request #446 from danielbprice/master
Issue #442 chai can't cope with AssertionErrors raised from node's assert
2015-10-02 10:52:14 +01:00
Austin Pray
936e7575f7 Fixes spelling error "everthing" -> "everything" 2015-09-28 21:29:41 -05:00
Jurko
27b6f7db58 document how the new Error type gets detected by the a/an matcher 2015-09-22 17:28:05 +02:00
Jérémie Astori
1f8c65135d Remove multi-type support for a/an assertion 2015-09-12 13:04:56 +00:00
Jérémie Astori
675b51b3ad Add a utility to enforce allowed types tested by an assertion 2015-09-12 12:59:51 +00:00
Jérémie Astori
0acb2ec8f5 Use new feature of a/an assertion to check type of tested object when using include assertion 2015-09-12 10:14:01 +00:00
Jérémie Astori
d27ceb54a4 Improve message of multi-type a/an assertions 2015-09-12 10:14:01 +00:00
Jérémie Astori
5eb39067ad Add support of multiple types in an/a assertions for the BDD API, with naive message 2015-09-12 10:14:01 +00:00
Jérémie Astori
cf0e3a5677 Check that expected type for include is an array, an object, or a string, in a naive way 2015-09-12 10:14:01 +00:00
Keith Cirkel
13a90097eb chai@3.3.0 2015-09-11 22:36:05 +01:00
Keith Cirkel
cf9f5d99d7 Merge pull request #512 from dereke/master
fixed expect('').to.contain('') so it passes
2015-09-11 22:20:30 +01:00
kpdecker
b6b84e5631 Fix stack trace tracking for property asserts
The ssfi parameter was not being updated for these methods, which ended up causing the trace to be omitted.

Fixes #358
2015-09-08 02:15:47 -05:00
Derek Ekins
eaba0be444 fixed expect('').to.contain('') so it passes 2015-09-01 13:59:39 +01:00
Keith Cirkel
a42ac436bb Merge pull request #496 from astorije/astorije/frozen-errors
Make sure TypeErrors thrown by frozen are caught
2015-08-10 10:13:16 +01:00
Jérémie Astori
1cc56c88eb Remove some trailing whitespaces 2015-07-26 19:43:02 +00:00
Jérémie Astori
ffc59fccd5 Make sure TypeErrors thrown by extensible are treated in a ES6 way and test these 2015-07-26 19:42:46 +00:00
Jérémie Astori
9b71590fe3 Make sure TypeErrors thrown by sealed are treated in a ES6 way and test these 2015-07-26 19:31:48 +00:00
Jérémie Astori
eae67c0d5c Make sure TypeErrors thrown by frozen are treated in a ES6 way and test these 2015-07-26 17:43:48 +00:00
Keith Cirkel
7d36b5aa4e Merge pull request #500 from wraithan/add-assert-gte-lte
isAtLeast, isAtMost assertions added to assert interface
2015-07-24 23:07:21 +01:00
Keith Cirkel
8aea7a55df Merge pull request #499 from Daveloper87/empty_string_check_fix
Shortened check for empty
2015-07-24 22:55:23 +01:00
Wraithan (Chris McDonald)
3c681e2dce isAtLeast, isAtMost assertions added to assert interface 2015-07-24 09:25:56 -07:00
Dai
bba85d0f37 Simplified .empty 2015-07-24 06:55:24 +01:00
Cezary Kluczyński
b9730e070f JSDoc blocks aligned with corresponding functions 2015-07-20 20:32:46 +02:00
Cezary Kluczyński
5bd86c2b38 isNotTrue, isNotFalse assertions added 2015-07-20 19:29:04 +02:00
Keith Cirkel
9fb29cd0d6 chai@3.2.0 2015-07-19 17:59:47 +01:00
Keith Cirkel
40cdaa3400 Merge pull request #489 from astorije/astorije/aliases
Various work on aliases
2015-07-19 17:58:14 +01:00
Jérémie Astori
e5071edd8b Invert assertions and aliases for is* assertions to make the documentation and code consistent with other is* assertions 2015-07-18 23:21:20 +00:00
Jérémie Astori
9e14164b67 Make throws aliases consistent across examples and definitions 2015-07-18 23:14:45 +00:00
Jérémie Astori
11aa743472 Add aliases (and tests) for assert.ok and assert.notOk to match the other isSomething assertions 2015-07-18 23:14:45 +00:00
Jérémie Astori
909616e0ad Fix wrong call to the underlying method when checking if an object is frozen 2015-07-18 01:40:02 +02:00
Jérémie Astori
ee573496d4 Add aliases to extensible, sealed and frozen properties for consistency 2015-07-17 23:30:45 +00:00
Jérémie Astori
3b980e5dd3 Fix docstring regarding assert.notFrozen 2015-07-17 23:30:03 +00:00
Keith Cirkel
36873c6cbf Merge pull request #484 from couchand/patch-1
Add respondsTo and satisfies as aliases
2015-07-17 16:33:18 +01:00
Denis Luchkin-Zhou
65180716d6 Fixing a typo in the getProperties() utility
...where `subject` should apparently be `object`.
2015-07-17 11:23:45 -04:00
Andrew Couch
802fa5e0bb Add respondsTo and satisfies as aliases 2015-07-17 11:14:17 -04:00
Keith Cirkel
6561fc29a4 chai@3.1.0 2015-07-16 22:02:04 +01:00
Brad Cypert
a5687a2648 Added support for NaN. Tests included. 2015-07-16 10:18:54 -07:00
matthewlucock
63a89f6967 Assertions to test if objects are frozen 2015-07-12 22:57:42 +10:00
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
Dai
d76225c7c4 fixed check on var name to obj from object 2015-06-29 00:41:23 +01:00
Keith Cirkel
4cdf8202c8 chai@3.0.0 2015-06-04 00:19:52 +01:00
Keith Cirkel
3b17b33cf8 Remove trailing comma
Fixes #459
2015-06-03 21:23:34 +01:00