Vladimir Kurchatkin
3f473ef141
assert: introduce deepStrictEqual
...
`deepStrictEqual` works the same way as `strictEqual`, but
uses `===` to compare primitives and requires prototypes of
equal objects to be the same object.
Fixes: https://github.com/joyent/node/issues/7161
Fixes: https://github.com/iojs/io.js/issues/620
PR-URL: https://github.com/iojs/io.js/pull/639
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-by: Rod Vagg <rod@vagg.org >
2015-02-09 14:14:20 +03:00
Vladimir Kurchatkin
e7573f9111
assert: don't compare object prototype property
...
All own enumerable properties are compared already. Comparing
`prototype` property specifically can cause weird behaviour.
PR-URL: https://github.com/iojs/io.js/pull/636
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-02-06 14:40:43 +03:00
cjihrig
40e29dcbbf
assert: use util.inspect() to create error messages
...
Currently, JSON.stringify() is used to create error messages
on failed assertions. This causes an error when stringifying
objects with circular references. This commit switches out
JSON.stringify() for util.inspect(), which can handle
circular references.
PR-URL: https://github.com/iojs/io.js/pull/668
Reviewed-By: Julien Gilli <julien.gilli@joyent.com >
Reviewed-By: Bert Belder <bertbelder@gmail.com >
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com >
2015-01-31 09:34:50 -05:00
isaacs
3e1b1dd4a9
Remove excessive copyright/license boilerplate
...
The copyright and license notice is already in the LICENSE file. There
is no justifiable reason to also require that it be included in every
file, since the individual files are not individually distributed except
as part of the entire package.
2015-01-12 15:30:28 -08:00
cjihrig
14dc9175eb
assert: throw when block is not a function
...
Currently, anything passed as the block argument to throws()
and doesNotThrow() is interpreted as a function, which can
lead to unexpected results. This commit checks the type of
block, and throws a TypeError if it is not a function.
Fixes: https://github.com/iojs/io.js/issues/275
PR-URL: https://github.com/iojs/io.js/pull/308
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-01-12 14:10:33 -05:00
teppeis
00a7456c19
assert: fix deepEqual regression
...
Change of Object.keys in ES6 breaks assert.deepEqual about primitive
values.
V8: https://code.google.com/p/v8/issues/detail?id=3443
Previously deepEqual depends on Object.key that throws an error for
a primitive value, but now Object.key does not throw.
PR-URL: https://github.com/iojs/io.js/pull/193
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2014-12-22 12:46:59 +01:00
Fedor Indutny
0e19476595
test: split test in parallel/sequential
...
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
PR-URL: https://github.com/iojs/io.js/pull/172
Fix : iojs/io.js#139
2014-12-17 20:45:02 +07:00