Commit graph

316 commits

Author SHA1 Message Date
Jake Luer
12467a6bfd Release 1.7.1 2013-06-24 14:46:03 -04:00
Jake Luer
c0f8e187a7 Release 1.7.0 2013-06-17 16:06:38 -04:00
Jake Luer
167d1a7193 error: remove internal assertion error constructor 2013-06-17 15:28:47 -04:00
Jake Luer
7bc580910e core: [assertion-error] replace internal assertion error with dep 2013-06-17 15:27:50 -04:00
Jake Luer
cfb6137054 docs: fix typo in source file. #174 2013-06-17 15:11:30 -04:00
Domenic Denicola
7c72e673f4 Fix utils.inspect with custom object-returning inspect()s.
This code is lifted from the latest node utils.js: 896b2aa707/lib/util.js (L205-L209)

Without it, if an object contains another object whose custom `inspect()` method returns a non-string, `utils.inspect` gets confused and tries to do `nonString.indexOf`.

This fixes domenic/chai-as-promised#32, where Chai as Promised was trying to call `utils.inspect` on an `AssertionError` which contained as its "actual" property a Q promise. Since Q promises have custom `inspect` methods that return objects, not strings, this was triggered.
2013-06-13 23:12:58 -04:00
Bartvds
774a723bff replaced tabs with 2 spaces 2013-06-09 01:31:26 +02:00
Bartvds
080702ac87 added assert.notOk() 2013-06-08 18:16:44 +02: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
Jake Luer
ad35240462 Release 1.6.1 2013-06-05 16:46:37 -04:00
George Kats
9c9ea88766 Fix comparison equality of two regexps. 2013-06-05 00:41:26 +03:00
Brandon Payton
21f0ee5b21 Fix documented name for assert interface's isDefined method 2013-05-03 12:25:36 -07:00
Jake Luer
e18c48329b Release 1.6.0 2013-04-29 20:15:39 -04:00
Jake Luer
bd72555c8a lib: [docs] finish documentation for members assertions 2013-04-29 19:59:41 -04:00
Jake Luer
019bb07637 assert: [(not)include] throw on incompatible haystack. Closes #142 2013-04-29 19:30:51 -04:00
Jake Luer
8f8d7425a5 assert: [notInclude] add assert.notInclude. Closes #158 2013-04-29 19:03:53 -04:00
Jake Luer
6f70c5eb74 core: [assertions] remove extraneous comments 2013-04-29 17:42:00 -04: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
4ea9185e9e Code review comments 2013-04-14 18:00:02 -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
Ruben Verborgh
caf2a151c0 Restore the call and apply methods of Function when adding a chainable method.
This was broken on platforms that have `__proto__` support.
Details at https://github.com/chaijs/chai/commit/514dd6ce4#commitcomment-2593383
2013-02-13 12:41:22 +01:00
Jake Luer
ab4bd0e76f Release 1.5.0 2013-02-03 20:49:13 -05:00
Jake Luer
fc24e98246 lib: update copyright to 2013 2013-02-03 19:01:36 -05:00
Jake Luer
163c3c614b assertions: refactor some assertions to use objDisplay instead of inspect 2013-02-03 18:02:30 -05:00
Jake Luer
2e8e2ce145 util: [objDisplay] normalize output of functions 2013-02-03 18:01:44 -05:00
Jake Luer
475b1f20f0 assertions: [throw] code cleanup 2013-02-03 15:49:52 -05:00
Jake Luer
37098ed9c9 core/assertions: [type] (a/an) refactor to use type detection utility 2013-02-03 15:12:12 -05:00
Jake Luer
8286612c83 util: add cross-browser type detection utility 2013-02-03 15:11:30 -05:00
Jake Luer
ff9005caa8 Merge branch 'feature/showDiff'
* feature/showDiff:
  test: [Assertion] configruable showDiff flag. Closes #132
  lib: [Assertion] add configurable showDiff flag. #132
  showDiff: force true for equal and eql

Conflicts:
	lib/chai/assertion.js
	test/display/message.js
2013-02-03 13:27:38 -05:00
Jake Luer
f5cf2c2f5a lib: [Assertion] add configurable showDiff flag. #132 2013-02-03 13:25:24 -05:00
Jake Luer
e619f98999 Merge pull request #136 from whatthejeff/message_fix
Fixed backwards negation messages.
2013-02-02 16:06:19 -08:00
DD
91d2805393 Fix issue #137, test message existence by using message!=null rather than using message 2013-02-03 00:49:48 +08:00
Jeff Welch
4033c14f01 Fixed backwards negation messages. 2013-02-01 23:12:01 -05:00
Jake Luer
02ed69e1d0 Merge pull request #133 from RubenVerborgh/throw
Fix assertions on functions that throw primitives
2013-01-28 06:25:55 -08:00
Ruben Verborgh
9bcc5e7f08 Functions throwing strings can reliably be tested. 2013-01-27 20:11:50 +01:00
Ruben Verborgh
4b90c17e05 Cache whether __proto__ is supported. 2013-01-19 17:32:34 +01:00
Ruben Verborgh
514dd6ce46 Use __proto__ if available. 2013-01-19 17:30:11 +01:00
Ruben Verborgh
ccb2ac85a4 Determine the property names to exclude beforehand. 2013-01-19 17:28:27 +01:00
Ruben Verborgh
7c319f099f Add alias eqls for eql. 2013-01-07 17:57:03 +01:00
Domenic Denicola
0fe68b021c Use inherited enumerable properties in deep equality comparison.
Fixes #120.
2012-12-30 06:26:26 -05:00
Domenic Denicola
730a12baa6 Show inherited properties when inspecting an object. 2012-12-30 06:25:17 -05:00
Domenic Denicola
fe45a2d667 Add new getProperties and getEnumerableProperties utils. 2012-12-30 06:24:23 -05:00
Jake Luer
d3de8cb4ed Release 1.4.2 2012-12-21 15:16:06 -05:00
Jake Luer
bc71605462 browser: no longer need different AssertionError constructor 2012-12-21 15:00:57 -05:00
Jake Luer
4279bca19b Release 1.4.1 2012-12-21 12:56:20 -05:00
Jake Luer
49a4655173 showDiff: force diff for equal and eql. #106 2012-12-21 12:50:04 -05:00
Jake Luer
972258cdff showDiff: force true for equal and eql 2012-12-21 12:47:29 -05:00
Edwin Shao
cdcca4f5f6 FIX: assert.Throw checks error type/message 2012-11-30 19:39:41 +08:00
Jake Luer
b2642cfb80 Release 1.4.0 2012-11-29 03:26:55 -05:00