Commit graph

121 commits

Author SHA1 Message Date
Jake Rosoman
acbf04dad2 handle negation correctly 2014-01-05 15:26:33 +13:00
Jake Rosoman
75bb2b68f6 add failing test case 2014-01-05 14:33:52 +13:00
Jake Rosoman
2715e95abc support {a:1,b:2}.should.include({a:1}) 2014-01-05 14:10:14 +13:00
Virginie BARDALES
2bb0ff2ab7 return error on throw method to chain on error properties, possibly different from message 2013-12-19 10:23:46 +01: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
8a2e00b486 test: [sauce] use karma@canary to prevent timeouts 2013-09-17 23:12:16 -04: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
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
Nick Heiner
244fa51336 giving members a no-flag assertion 2013-04-23 11:12:23 -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
6ccbd03780 tests: refactor some tests to support new objDisplay output 2013-02-03 18:03:40 -05:00
Jake Luer
8ae89cd72d test: [expect] add arguments type detection test 2013-02-03 15:12:29 -05:00
Jeff Welch
4033c14f01 Fixed backwards negation messages. 2013-02-01 23:12:01 -05:00
Domenic Denicola
730a12baa6 Show inherited properties when inspecting an object. 2012-12-30 06:25:17 -05:00
Jake Luer
3aa71e77cf test: [expect] type null. #122 2012-12-15 15:08:30 -05:00
Jake Luer
86fe576d56 convert tests to use new bootstrap 2012-11-29 03:18:48 -05:00
Chun-Yi
0422f071a4 Add most() (alias: lte) and least() (alias: gte) to the API with new chainers "at" and "of".
The new chainers can be used with least() and most().
Examples:
	expect(5).to.be.at.least(5);
	(5).should.be.at.most(5);
	expect([1, 2]).to.have.length.of.at.least(2);
2012-11-29 11:55:57 +08:00
Jake Luer
d9758753a2 add back buffer test for deep equal 2012-10-01 16:14:32 -04:00
Jake Luer
a2e8d2ce0f remove buffer test from expect 2012-10-01 15:31:54 -04:00
Jake Luer
ca18882362 Merge branch 'master' of git://github.com/Liffft/chai into Liffft-master
* 'master' of git://github.com/Liffft/chai:
  Cleaning up the js style…
  expect tests now include message pass-through
  packaging up browser-side changes…
  Increasing Throws error message verbosity
  Should syntax: piping message through

Conflicts:
	test/expect.js
2012-10-01 15:06:24 -04:00
Jake Luer
9dd85eabd3 improved buffer deep equal checking 2012-10-01 14:47:21 -04:00
Scott Nonnenberg
d6bbc5fddd expect tests now include message pass-through 2012-09-05 11:13:14 -07: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
Kilian Ciuffolo
da2bbbf666 fixes #79 2012-06-26 13:41:15 +02:00
Jake Luer
7629f8c4e5 tests for length as chainable property. #74 2012-06-24 08:46:44 -04:00
Benjamin Horsleben
80aa590ec5 Added itself chain. 2012-06-02 19:27:55 +02:00
Jake Luer
d02e94adff fix safari addChainableMethod errors. Closes #69
- also added arguments alias to `Arguments`.
- note: one can also call `expect(arguments).to.be.an('arguments')`
2012-05-29 13:07:00 -04:00
domenic
8cd580d7f2 Make error message for eql/deep.equal more clear. 2012-05-27 17:34:27 -04:00
domenic
db98bd69e6 Fix .not.deep.equal.
It wasn't passing the negation through.
2012-05-27 17:31:06 -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
aa3d84aab6 missing assert tests for ownProperty 2012-05-06 07:22:29 -04:00
Veselin Todorov
f58760c615 Add undefined assertion 2012-04-29 09:59:24 +03:00
Veselin Todorov
234f4ee613 Add null assertion 2012-04-29 09:59:14 +03:00
Jake Luer
87870b1b9d clean up redundant tests 2012-04-22 16:54:11 -04:00
domenic
4227b80d3a Fixing order of error message test.
It was saying "expected <expected> to equal <actual>," which is backwards, and very confusing.
2012-04-15 15:14:43 -04:00
domenic
41f645dbb8 Added support for throw(errorInstance).
Closes #47.
2012-04-09 00:34:02 -04:00
domenic
f58f1ebb12 Use a foolproof method of grabbing an error's name.
Closes #45.
2012-04-09 00:34:01 -04:00
domenic
48eeb56a75 Removed constructor.name check from throw.
Closes #46 and helps with #45.
2012-04-09 00:34:01 -04:00
Jake Luer
7890dc6aa6 chai.fail no longer exists 2012-03-14 16:52:41 -04:00
Jake Luer
9ab32d7757 Merge branch 'bug/33-throws' 2012-03-07 11:42:50 -05:00
Jake Luer
7bb24c874e Assertion#throw expect tests 2012-03-07 11:37:23 -05:00
Veselin Todorov
2a34fe8120 Add more tests for empty in expect. 2012-03-07 18:01:18 +02:00
Veselin Todorov
f1e6a9abb3 Merge branch 'master' into empty-object
* master:
  don't switch act/exp
  Update the compiled verison.
  Add `assert.operator`.
  Notes on messages. #22
  browser build
  have been test
  below tests
  browser build
  remove unnecessary fail export
  full support for actual/expected where relevant
  Assertion.assert support expected value
  clean up error
2012-03-07 17:49:20 +02:00
Jake Luer
fe72b36477 below tests 2012-03-01 19:28:30 -05:00
Veselin Todorov
670f128970 Add object & sane arguments support to Assertion#empty. 2012-02-29 21:51:42 +02:00
Veselin Todorov
63e1349473 Falsey -> falsy. 2012-02-27 22:33:24 +02:00
Veselin Todorov
536b6dce20 Add should tests for type checks. 2012-02-25 20:42:49 +02:00
Veselin Todorov
f731ebbc67 Add function type check test. 2012-02-25 20:38:43 +02:00
Veselin Todorov
dadda1bebe Add more type checks tests. 2012-02-25 20:33:05 +02:00
Veselin Todorov
701feaa671 Add test for new Number type check. 2012-02-25 20:28:40 +02:00
Veselin Todorov
400f67dbf0 Add .closeTo() expect test. 2012-02-25 00:00:03 +02:00
Veselin Todorov
55814ded6f Add .satisfy() expect test. 2012-02-24 22:30:20 +02:00
Veselin Todorov
27a36a5f85 Add respondTo expect test. 2012-02-24 21:53:15 +02:00
Jake Luer
67024ae9f5 regex error.message testing 2012-02-07 16:39:08 -05:00
Jake Luer
78b5bb429b some tests for assert module 2012-01-21 18:38:18 -05:00
Jake Luer
a51dece9a5 convert tests to tdd 2012-01-02 00:45:06 -05:00
Jake Luer
bb6c5e97e8 new expect empty tests 2011-12-24 13:10:55 -05:00
Jake Luer
6bf25daf17 code clean 2011-12-18 07:30:59 -05:00
Jake Luer
afb45f033c throw tests 2011-12-18 06:41:13 -05:00
Jake Luer
0165fc068a contain is now include … keys modifier is now contain 2011-12-18 05:56:21 -05:00
Jake Luer
bbdb2a49b1 removed #respondTo 2011-12-18 04:56:48 -05:00
Jake Luer
1c9cbc8ecb added exist test 2011-12-15 15:06:17 -05:00
Jake Luer
4d0a23f2e6 var expect outside of browser if check 2011-12-15 13:19:11 -05:00
Jake Luer
6538dcc16a failing on purpose successful .. back to normal 2011-12-15 08:01:06 -05:00
Jake Luer
e099212192 testing travis failure 2011-12-15 07:59:16 -05:00
Jake Luer
18d6180213 expect tests browser compatible 2011-12-15 07:03:47 -05:00
Jake Luer
958661003b tests for should and expect (all pass) 2011-12-15 05:54:37 -05:00