Commit graph

243 commits

Author SHA1 Message Date
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
root
da2ec4a1d4 No longer using eval on assert operator #386 2015-03-08 13:18:49 -04: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
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
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
9080562c9a using proper error checking method for should 2015-01-30 16:00:47 -05:00
Ian Zamojc
d353bf7bc5 added should.fail() method 2015-01-30 16:00:46 -05:00
toastynerd
498fe95126 add the which chain method as per issue #347 2015-01-22 09:07:59 -08: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 Polis
c44a5133f9 expect/should tests for change,increase,decrease 2014-12-27 17:10:59 -08:00
Chris Jones
e0e06082ea Added the all and any flags for keys assertion, with all being the default behavior
Extended keys documentation and set bools instead of changing flags in the keys assertion

Miswrote in keys documentation, corrected mistake

Edited documentation for keys to better match how it interacts with contains and have
2014-12-03 18:00:42 -05:00
Chris Jones
e3e170d3e0 Fixes issue #291, adds assert.sameDeepMembers 2014-12-02 19:38:07 -05:00
Keith Cirkel
49e003c1f2 Merge pull request #311 from cjqed/305-above-below-on-assert
Issue #305 fixed, added assert.isAbove and assert.isBelow
2014-12-02 22:56:11 +00:00
Keith Cirkel
7de269af35 Merge pull request #308 from prodatakey/hasproperty
Fix properties with `undefined` value pass property assertion
2014-12-02 22:55:14 +00:00
Chris Jones
e8e8caf4c2 Issue #305 fixed, added assert.isAbove and assert.isBelow 2014-11-29 01:52:00 -05:00
Joshua Perry
dd51594075 More unit tests for new utility functions 2014-11-21 12:27:26 -07:00
Joshua Perry
2d22f4534e Refactor common functionality, document, test 2014-11-20 16:48:56 -07:00
Joshua Perry
8cdb7b1d76 Refactor if statement out 2014-11-18 17:42:30 -07:00
Joshua Perry
c4b0d18829 Small unit test fix 2014-11-18 17:25:39 -07:00
Joshua Perry
7d466b2d37 Handle array indexing terminating paths 2014-11-18 17:18:00 -07:00
Joshua Perry
32826c06df Fix properties with undefined value pass property assertion 2014-11-15 16:29:57 -07:00
Keith Cirkel
b826feba51 Revert "Allows writing lint-friendly tests" 2014-11-13 11:58:50 +00:00
Keith Cirkel
828f48148f Merge pull request #297 from prodatakey/noopchainfunc
Allows writing lint-friendly tests
2014-11-10 09:44:19 +00:00
Julien Wajsberg
84cba222d1 Fix #299: the test is defining global variables 2014-11-06 12:09:55 +01:00
Joshua Perry
867563b0db Add a couple more unit tests 2014-11-05 10:14:28 -07:00
Joshua Perry
b4c0424ffb Add unit tests for chained terminating property asserts 2014-11-05 07:30:45 -07:00
David da Silva
edef912f41 why not more assertions 2014-11-01 20:24:59 +01:00
David da Silva
627e4b0096 added test for inspecting -0 2014-11-01 20:19:27 +01:00
Joshua Perry
cc1357d344 Change test to not trigger argument bug 2014-10-13 18:00:07 -06:00
Joshua Perry
4b0c0b6222 Allows writing lint-friendly tests
This makes the final assertion checks noop functions so that they can be formatted like function calls. This keeps linters (JSLint/JSHint) off our back for having an inop expression.

Completes #41
2014-10-13 16:31:17 -06: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
Jake Luer
3e692e6d04 Merge pull request #279 from mohayonao/fix-closeTo
fix: closeTo should check value's type before assertion
2014-09-29 18:15:53 -04:00
Christopher Hiller
6d6f03d2d2 resolves #255: upgrade mocha 2014-09-11 22:54:56 -07: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
1df11d0027 util: [getActual] select actual logic now allows undefined for actual. Closes #183 2014-03-18 09:35:43 -04:00
Roman Masek
9e5f9ffd3b Fix issue #166 - configurable threshold in objDisplay. 2014-03-18 08:20:15 +01:00
Roman Masek
7dd05e3b7a Move configuration options to config.js. 2014-03-18 08:18:11 +01:00
Jake Luer
07b34c7b49 Merge pull request #233 from Empeeric/master
ssfi as it should be
2014-02-25 12:43:59 -05:00
leider
cb910afc52 additional test finds incomplete implementation 2014-02-09 14:41:03 +01:00
leider
7352fdeec7 fixing #239 (without changing chai.js) 2014-02-09 13:31:45 +01:00
Refael Ackermann
62d9ceb208 ssfi as it should be 2014-01-30 10:23:19 +02:00
Duncan Beevers
ec62443b7c Deep equality check for collection membership 2014-01-29 19:08:16 -06: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