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
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
Wraithan (Chris McDonald)
3c681e2dce
isAtLeast, isAtMost assertions added to assert interface
2015-07-24 09:25:56 -07:00
Cezary Kluczyński
5bd86c2b38
isNotTrue, isNotFalse assertions added
2015-07-20 19:29:04 +02:00
Jérémie Astori
3be31001d1
Add tests for throws aliases
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
40dc848842
Add tests for frozen, sealed and extensible aliases
2015-07-18 23:08:12 +00: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
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
Keith Cirkel
57a5bfd6f2
Merge pull request #451 from csnover/browserify
...
Switch to use Browserify for builds
2015-05-29 20:17:14 +01:00
⅕ Zander
91f57e9598
Add tests for undefined property error
2015-05-29 02:16:22 -04:00
Colin Snover
afc8aa1d50
Switch to use Browserify for builds
...
Fixes #362 .
2015-05-27 13:04:16 +00:00
James Kyle
f1572d64d2
Add Assertion alias: matches => match. Resolves #438
2015-05-04 08:50:34 -07:00
Jordan Harband
517d46392f
Use a regex to account for property ordering issues across engines.
2015-04-07 09:16:10 -07:00
Jordan Harband
8b6a3ccb31
Add ownPropertyDescriptor
assertion.
2015-03-26 14:08:53 -07: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
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