koichik
72bc4dcda4
assert: fix throws() throws an error without message property
...
Fixes #2893 .
2012-07-29 19:48:16 +09:00
Nathan Rajlich
9eddaebb79
assert: remove unnecessary use of __proto__
...
AssertionError already inherits from Error above using util.inherits(),
so this extra line was redundant.
test/simple/test-assert.js already tests for `instanceof`, and still passes.
2012-07-25 10:41:08 -07:00
Nao Iizuka
f8ce384446
docs: correct the description of assert.ok()
2012-03-12 02:27:55 +01:00
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.
2011-12-20 00:10:49 +01:00
Pedro Teixeira
a805012d6f
assert: .deepEqual() support for RegExp objects
2011-12-20 00:10:38 +01:00
Colton Baker
87286cc737
Fixed a lot of jslint errors.
...
Fixes #1831
2011-10-05 18:51:06 -07:00
Maciej Małecki
8c8d518723
assert: Make assert
module an assert.ok
function
...
Code can be written:
var assert = require('assert');
assert(true);
instead of:
var assert = require('assert');
assert.ok(true);
2011-10-02 02:25:52 +02:00
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.
2011-08-09 14:20:06 -07:00
koichik
5f97c9a005
Improvements AssertionError message
...
Fixes #217 .
2011-07-14 02:08:24 +09:00
Ryan Dahl
5a05992155
Lint
2011-01-06 16:06:27 -08:00
Oleg Slobodskoi
23cf938e4f
fix assert.throws
2010-12-21 12:41:57 -08:00
Ryan Dahl
db78043d52
lint
2010-12-01 16:42:31 -08:00
Oleg Slobodskoi
02083412eb
assert.throws can now accept as RegExp
...
makes validation of errors more flexible
2010-11-29 17:22:36 -08:00
Micheil Smith
e38eb0c5a4
Soft migration of sys -> util, Removal of deprecated utils module.
2010-10-11 15:21:36 -07:00
Joshaven Potter
3d4e4d8909
syntax fixes to pass jslint
2010-10-06 20:40:57 -07:00
Ryan Dahl
1be722a271
Special deepEquals for buffer
2010-09-07 17:14:04 -07:00
Mikeal Rogers
fe3d8f2411
Add assert.ifError
2010-05-21 12:06:12 -07:00
isaacs
57fbb627ca
trailing whitespace fixes
2010-04-11 14:48:23 -07:00
Ryan Dahl
4ccdc501d4
Include lib/ directory in node executable. Compile on demand.
...
Instead of installing the files in /usr/lib/node/libraries and loading them
from the file system, the files are built-in to the node executable.
However, they are only compiled on demand.
The reasoning is:
1. Allow for more complex internal javascript. In particular,
process.stdout and process.stdin can be js implemented streams.
2. Ease system installs. Loading from disk each time is unnecessary
overhead. Note that there is no "system" path for modules anymore. Only
$HOME/.node_libraries.
2010-03-15 08:04:35 -07:00
Ryan Dahl
b021a845f7
Move process.inherits to sys
2010-03-01 11:39:35 -08:00
Ryan Dahl
c420c89dbd
Make assert.AssertionError instance of Error
2010-01-24 14:39:32 -08:00
Ryan Dahl
0accebe583
Stack trace for asserts shouldn't include assert module
2009-12-29 20:15:05 +01:00
Ryan Dahl
dd35637603
Fix assert.js code style
2009-12-29 20:10:59 +01:00
Karl Guertin
4f679fd8d0
Dependency free assert module with unit tests
2009-12-05 01:05:16 +01:00
Felix Geisendörfer
530328f12b
CommonJS testing for node.js
...
Refactored test suite to use the assert module for testing rather than
mjsunit.
2009-12-05 01:05:16 +01:00