Commit graph

202 commits

Author SHA1 Message Date
Jake Luer
666e75cfd6 assert minor refactor
- assert is now a function
- length is now lengthOf
- ownProperty derivatives done have `own` keyword
2012-05-09 19:16:26 -04:00
Jake Luer
9bacec225b added chai.Assertion.add/overwrite prop/method for plugin toolbox 2012-05-09 18:56:53 -04:00
Jake Luer
7fe1f31ad9 add/overwrite prop/method don't make assumptions about context 2012-05-09 18:56:15 -04:00
Jake Luer
4a4966d94d refactor all simple chains into one forEach loop, for clean documentation 2012-05-09 17:22:53 -04:00
Jake Luer
8cec45ac8a comment updates for docs 2012-05-09 12:12:34 -04:00
domenic
3b927d4994 Using message flag in getMessage util instead of old msg property. 2012-05-07 18:03:50 -04:00
domenic
8625a5ae09 getMessage shouldn't choke on null/omitted messages.
This came up when doing `assert(false, "message")`.
2012-05-07 17:49:38 -04:00
Domenic Denicola
942c5b98d1 return this not necessary in example. 2012-05-07 17:26:27 -03:00
Domenic Denicola
8df3b13fe8 return this not necessary in example. 2012-05-07 17:24:06 -03:00
Jake Luer
0e2c11a4ab Release 1.0.0-rc2 2012-05-06 07:29:20 -04:00
Jake Luer
bed8867ac0 appropriate assert equivalent for expect.to.have.property(key, val) 2012-05-06 07:22:07 -04:00
Jake Luer
d03d686330 reset AssertionError to include full stack 2012-05-06 07:01:34 -04:00
Jake Luer
9105b89fc9 overwrite Property and Method now ensure chain 2012-05-06 06:54:21 -04:00
Jake Luer
0ecbc0eab2 Release 1.0.0-rc1 2012-05-04 17:58:24 -04:00
Jake Luer
97296e4979 assert interface - notMatch, ownProperty, notOwnProperty, ownPropertyVal, ownPropertyNotVal 2012-05-04 17:55:11 -04:00
Jake Luer
1082fc6544 cleaner should interface export.
- also aliased `chai.Should()` as the original would be overwritten after the first call (helps when using watch mode for test runners)
2012-05-04 17:55:11 -04:00
Jake Luer
755a36938b added chai.Assertion.prototype._obj (getter) for quick access to object flag 2012-05-04 17:55:11 -04:00
Jake Luer
0a8ddc452f moved almostEqual / almostDeepEqual to stats plugin 2012-05-04 17:55:11 -04:00
Veselin Todorov
22f594a0b9 Fix a typo 2012-04-29 10:21:33 +03: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
ee2050abaa Merge pull request #54 from josher19/master
Added almostEqual to assert test suite.
2012-04-23 21:07:36 -07:00
josher19
d2f80f5991 Remove old test.assert code 2012-04-24 11:44:16 +08:00
josher19
d5fe1839a0 Use util.inspect instead of inspect for deepAlmostEqual and almostEqual 2012-04-24 11:34:59 +08:00
Jake Luer
ed14ab04c9 bug - context determinants for utils 2012-04-23 01:40:28 -04:00
josher19
6702b4da3d dec=0 means rounding, so assert.deepAlmostEqual({pi: 3.1416}, {pi: 3}, 0) is true 2012-04-23 13:36:12 +08:00
Jake Luer
6292957d5e [bug] util addProperty not correctly exporting 2012-04-22 18:22:12 -04:00
Jake Luer
df069ad2d1 not using reserved words in internal assertions. #52
This commit fixes #52 in 1.0.0+

- also added mt/lt alias
2012-04-22 17:03:48 -04:00
Jake Luer
fc4956e9fa version tick 2012-04-22 16:54:21 -04:00
Jake Luer
2d49079f60 Merge branch 'refs/heads/0.6.x'
Conflicts:
	chai.js
	docs/out/chai.js
	docs/out/code/assert.html
	docs/out/code/expect.html
	docs/out/index.html
	docs/out/support/coverage/index.html
	docs/out/support/tests/mocha.js
	lib/assertion.js
	lib/chai.js
	lib/error.js
	lib/interface/assert.js
	package.json
2012-04-22 16:39:54 -04:00
Jake Luer
b009feb48f updated utility comments 2012-04-22 15:26:15 -04:00
Jake Luer
c49ef2790d utility - overwriteMethod 2012-04-22 14:46:34 -04:00
Jake Luer
f7fd4ea282 utility - overwriteProperty 2012-04-22 14:46:26 -04:00
Jake Luer
f790baa32b utility - addMethod 2012-04-22 14:46:12 -04:00
Jake Luer
76b195cd6c utility - addProperty 2012-04-22 14:46:03 -04:00
Jake Luer
31e3035c3d missing ; 2012-04-22 14:44:52 -04:00
Jake Luer
dd66ecbfd8 Release 0.5.3 2012-04-21 19:04:59 -04:00
Juliusz Gonera
23b9ed37df fixed reserved names for old browsers in interface/assert 2012-04-20 20:02:00 -04:00
Juliusz Gonera
1af9807791 fixed reserved names for old browsers in interface/should 2012-04-20 19:58:06 -04:00
Juliusz Gonera
87e1a54ceb fixed: chai.js no longer contains fail() 2012-04-20 19:48:30 -04:00
Juliusz Gonera
d90f152ebc fixed reserved names for old browsers in Assertion 2012-04-20 19:35:21 -04:00
Veselin Todorov
4a8b41e268 Include/contain are now both properties and methods 2012-04-20 20:44:23 +03:00
Veselin Todorov
570e5a121e Add an alias annotation 2012-04-20 20:43:34 +03:00
Veselin Todorov
b2b2b2a9bc Remove usless function wrapper 2012-04-20 20:27:40 +03:00
Veselin Todorov
146598d21c Fix a typo 2012-04-20 20:16:26 +03:00
Veselin Todorov
087047231e A/an are now both properties and methods 2012-04-20 20:14:21 +03:00
domenic
1d39eaf3ab Ignore IE-specific error properties. 2012-04-15 15:14:43 -04:00
domenic
888c752e61 New cross-browser getName util. 2012-04-15 15:14:43 -04:00
domenic
272fcf5a3c Fixing up AssertionError inheritance.
* Use `Object.create` instead of `__proto__` for inheritance.
* Don't forget to set `AssertionError.prototype.constructor`.
* Put `name` on `AssertionError.prototype`, not on each instance.
2012-04-15 15:13:49 -04:00
domenic
ad3b19fe75 [bug] was still using constructor.name in throw assertion 2012-04-15 14:26:40 -04:00