Commit graph

458 commits

Author SHA1 Message Date
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
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
BinaryMuse
b5c597f7a2 Remove stray character in assert.notInclude docs 2015-06-01 11:57:32 -07:00
David Losert
81b88f869b Replaced type.js with the "chaijs/type-detect" library. 2015-05-29 20:38:44 +01: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
0027d65a54 Don't rely on optional args value being implicitly undefined 2015-05-29 01:35:33 -04:00
Keith Cirkel
dcca61d04e Update lengthOf examples 2015-05-13 09:05:00 +01:00
Keith Cirkel
d3696cafaf Quick version fix for length deprecation 2015-05-10 23:28:31 +01:00
Keith Cirkel
eb31f3d5e0 Merge pull request #429 from valscion/document-deprecation-plan-of-length
Add .length(value) deprecation warning to documentation
2015-05-10 23:27:14 +01:00
James Kyle
f1572d64d2 Add Assertion alias: matches => match. Resolves #438 2015-05-04 08:50:34 -07:00
Keith Cirkel
0a113fb88f Merge pull request #424 from astorije/astorije/minimalist-typo
Fix erroneous example in the docstring of the keys assertion
2015-05-03 11:59:02 +01:00
Keith Cirkel
73f5d99ecf Merge pull request #397 from astorije/astorije/assert-plugin-api
Add missing parameter showDiff and make docstring "documentationable"
2015-05-03 11:54:45 +01:00
Keith Cirkel
2abd737618 Release 2.3.0 2015-04-26 17:18:03 +01:00
Vesa Laakso
2330d93bdc Add .length(value) deprecation warning to documentation
Fixes https://github.com/chaijs/chai/issues/427
2015-04-17 16:55:55 +03:00
Jérémie Astori
0f6ab288f0 Fix erroneous example in the docstring of the keys assertion 2015-04-12 17:23:10 -04:00
Mitchell Johnson
2675bbb7e1 Fix a small bug in the .null assertion docs 2015-04-07 12:39:36 -04:00
Jérémie Astori
a62ac240e5 Remove trailing whitespaces 2015-04-04 13:55:46 -04:00
Jérémie Astori
63f727ba85 Fix super minor typo in an example 2015-04-04 13:55:34 -04:00
Jordan Harband
8b6a3ccb31 Add ownPropertyDescriptor assertion. 2015-03-26 14:08:53 -07:00
Keith Cirkel
2173e6378c Release v2.2.0 2015-03-26 18:03:02 +00:00
Keith Cirkel
dc5bb480b7 Tweak documentation on .deep flag. 2015-03-20 09:26:14 +00:00
Kaito Udagawa
1aae1b05db Documentation of escaping in .deep flag. 2015-03-20 16:15:13 +09:00
Kaito Udagawa
8d370cf4f3 take regular expression apart 2015-03-19 20:39:55 +09:00
Kaito Udagawa
704670a23b Feature: backslash-escaping in .deep.property
This commit includes:
* getPathInfo handles escaping `.[]`
* Documentation added to `.property`
* Documentation added to `.getPathInfo`
* Test cases for `.property`
* Test cases for `.deep.property`
* Test cases for `.getPathInfo`
Note that the input of `.getPathInfo` assumed to match the following:
/^(?:(?:\\[.\[\]]|[^.\[\]])+|\[\d+\])(?:\.(?:\\[.\[\]]|[^.\[\]])+|\[\d+\])$/
2015-03-18 21:57:03 +09:00
Kaito Udagawa
b6e1b573e0 Escaping dot should be taken in deep property
* removing backslash prior to "."
* test case: "foo\\.bar" names {"foo.bar": "baz"}
2015-03-17 19:39:14 +09:00
Keith Cirkel
9249acc4c5 Release v2.1.2 2015-03-15 21:22:54 +00:00
Jérémie Astori
15b9c70710 Add missing parameter showDiff and make docstring "documentationable" 2015-03-09 20:22:33 -04:00
root
da2ec4a1d4 No longer using eval on assert operator #386 2015-03-08 13:18:49 -04:00
Keith Cirkel
afd689acb3 Release v2.1.1 2015-03-04 20:19:52 +00:00
eldritch fossicker
bb8d0bf7a4 updates to reflect code style preference from @keithamus 2015-03-03 14:28:44 -06:00
eldritch fossicker
57ef36621f fix indexing into array with deep propery
* added unit test to expect with code from documentation
* added default to res in _getPathValue
2015-03-02 14:00:46 -06:00
Keith Cirkel
062d731762 Merge pull request #382 from astorije/patch-2
Add missing docstring for showDiff argument of assert
2015-03-01 11:03:33 +00:00
Vlad GURDIGA
be8d7a69ba config.truncateThreshold docs: simpler wording 2015-03-01 12:53:44 +02:00
Jérémie Astori
592be870e8 Add missing docstring for showDiff argument of assert 2015-02-28 18:02:38 -05:00
Jérémie Astori
d080d1a6a4 Add a minor precision that empty asserts on strings too. 2015-02-28 00:50:35 -05:00
Doug Neiner
ef04544328 Primitives now use valueOf in shouldGetter
This allows the should syntax to be more resilient when
dealing with modified primitive constructors which
may occur more frequently with ES6 to ES5 transpilation.
2015-02-24 12:09:14 -06:00
Keith Cirkel
ee5d666059 Release v2.1.0 2015-02-23 21:05:04 +00:00
Jesse McCarthy
a8ffb9c152 Increment version to 2.0.1.
See https://github.com/chaijs/chai/issues/373
2015-02-23 11:19:51 -05:00
Keith Cirkel
9b25d0c524 Merge pull request #356 from Soviut/master
Added fail() method to Should and Expect interfaces
2015-02-10 23:41:58 +00:00
Ian Zamojc
ffd7c190e4 documented fail methods for expect and should interfaces 2015-02-10 18:39:39 -05:00
Ian Zamojc
c2f9e430d9 fail method added directly to expect 2015-02-10 16:50:31 -05:00
Gregg Lind
4f40b37356 fix #359. Add `.keys(object)
- `.keys(object)n => .keys(Object.keys(Object)`
- added exceptions for 'if first arg is non-string, then it must be only
arg.  => `.keys(Array|Object, ...)`

Warning:  `Object.keys` must exist on systems to use this functionality.
2015-02-09 09:16:01 -06:00
Gregg Lind
68f3c02f07 Fix #359 keys() sorts input unexpectedly 2015-02-05 19:36:09 -06:00
Ian Zamojc
61d8718c69 added fail() method to expect interface 2015-01-30 16:00:47 -05:00
Ian Zamojc
41b158720b changed default message for should.fail() 2015-01-30 16:00:47 -05:00
Ian Zamojc
d353bf7bc5 added should.fail() method 2015-01-30 16:00:46 -05:00