Ryan Doenges
6101eb184d
assert: put info in err.message, not err.name
4716dc6
made assert.equal() and related functions work better by
generating a better toString() from the expected, actual, and operator
values passed to fail(). Unfortunately, this was accomplished by putting
the generated message into the error's `name` property. When you passed
in a custom error message, the error would put the custom error into
`name` *and* `message`, resulting in helpful string representations like
"AssertionError: Oh no: Oh no".
This commit resolves that issue by storing the generated message in the
`message` property while leaving the error's name alone and adding
a regression test so that this doesn't pop back up later.
Closes #5292 .
12 years ago
koichik
72bc4dcda4
assert: fix throws() throws an error without message property
Fixes #2893 .
13 years ago
isaacs
0cdf85e28d
Lint all the JavaScripts.
13 years ago
Andreas Madsen
4865063924
Tests: fix jslint issues
13 years ago
Maciej Małecki
5c7532e5b3
assert: test `RegExp`'s properties when checking for equality
Previous code ignored the fact that `/a/ != /a/g`.
Test case included.
13 years ago
Pedro Teixeira
a805012d6f
assert: .deepEqual() support for RegExp objects
14 years ago
Colton Baker
87286cc737
Fixed a lot of jslint errors.
Fixes #1831
13 years ago
Maciej Małecki
365fdbfc64
test: Update assert module tests
13 years ago
Ryan Dahl
0696e78d64
Improve assert error messages
1. actual and expected should be displayed in the same order they were given
2. long values should be truncated.
13 years ago
koichik
5f97c9a005
Improvements AssertionError message
Fixes #217 .
14 years ago
Ryan Dahl
6394ba28c8
Add test for circular refs in deepEquals
Closes GH-207.
14 years ago
Ryan Dahl
55048cdf79
Update copyright headers
14 years ago
Oleg Slobodskoi
23cf938e4f
fix assert.throws
14 years ago
Oleg Efimov
0665f0271e
GJSLint all simple tests exclude http-*, url, path
14 years ago
Ryan Dahl
a0159b4b29
Fix global leaks
14 years ago
Oleg Slobodskoi
02083412eb
assert.throws can now accept as RegExp
makes validation of errors more flexible
14 years ago
Herbert Vojčík
cf2b206a8e
More changes to tests so they really work under context module loader.
Plus, getting rid of test/common.js defining things in global.
14 years ago
Ryan Dahl
9fd5e3c89c
Update tests to work with module contexts
15 years ago
Mikeal Rogers
fe3d8f2411
Add assert.ifError
15 years ago
isaacs
5861db8a69
Remove process.mixin dependency from all tests.
15 years ago
arlolra
04fac19822
Split tests.
15 years ago
Ryan Dahl
dd35637603
Fix assert.js code style
15 years ago
Ryan Dahl
89a3fa93a0
add missing semicolon
15 years ago
Karl Guertin
4f679fd8d0
Dependency free assert module with unit tests
15 years ago