Age | Commit message (Collapse) | Author | Files | Lines |
|
Port of https://github.com/joyent/node/pull/8603
The race condition present in the original PR didn't occur, so no
workaround was needed.
PR-URL: https://github.com/nodejs/io.js/pull/1794
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
|
|
PR-URL: https://github.com/iojs/io.js/pull/1539
Fixes: https://github.com/iojs/io.js/issues/1253
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
|
|
Delegate buffer equality check to `buffer.equals()`
PR-URL: https://github.com/iojs/io.js/pull/1171
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Christian Vaagland Tellnes <christian@tellnes.com>
|
|
`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>
|
|
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>
|
|
Many of the util.is*() methods used to check data types
simply compare against a single value or the result of
typeof. This commit replaces calls to these methods with
equivalent checks. This commit does not touch calls to the
more complex methods (isRegExp(), isDate(), etc.).
Fixes: https://github.com/iojs/io.js/issues/607
PR-URL: https://github.com/iojs/io.js/pull/647
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
|
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>
|
|
This commit replaces a number of var statements throughout
the lib code with const statements.
PR-URL: https://github.com/iojs/io.js/pull/541
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
|
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>
|
|
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>
|
|
Turn on strict mode for the files in the lib/ directory. It helps
catch bugs and can have a positive effect on performance.
PR-URL: https://github.com/node-forward/node/pull/64
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
|
|
Conflicts:
doc/api/buffer.markdown
lib/_stream_readable.js
lib/assert.js
lib/buffer.js
lib/child_process.js
lib/http.js
lib/string_decoder.js
lib/zlib.js
node.gyp
test/simple/test-buffer.js
test/simple/test-https-foafssl.js
test/simple/test-stream2-compatibility.js
test/simple/test-tls-server-verify.js
|
|
Switch condition order to check for null before calling isNaN().
Also remove two unnecessary calls to isNaN() that are already
covered by calls to isFinite(). This commit targets v0.10, as
opposed to #7891, which targets master (suggested by
@bnoordhuis). Closes #7840.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
|
|
Conflicts:
configure
lib/_stream_readable.js
lib/http.js
src/node_dtrace.cc
|
|
Ensure that the behavior of `assert.deepEqual` does not depend on
argument ordering when comparing an `arguments` object with a
non-`arguments` object.
|
|
AssertionError.generatedMessage is now true when
AssertionError.message was generated from expected and actual
Fixes #5836, #6206
|
|
|
|
Not harmful, just code cleanup.
Fixes #5885.
|
|
Increases the grep factor. Makes it easier to harmonize type checks
across the code base.
|
|
|
|
|
|
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.
|
|
|
|
More detailed information in GH-693
|
|
It takes an optional "expected exception" argument that is not used meaningfully
but is nevertheless documented. Undocument it, it confuses casual readers of the
documentation.
Fixes #3935.
|
|
Fixes #2893.
|
|
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.
|
|
|
|
Previous code ignored the fact that `/a/ != /a/g`.
Test case included.
|
|
|
|
Fixes #1831
|
|
Code can be written:
var assert = require('assert');
assert(true);
instead of:
var assert = require('assert');
assert.ok(true);
|
|
1. actual and expected should be displayed in the same order they were given
2. long values should be truncated.
|
|
Fixes #217.
|
|
|
|
|
|
|
|
makes validation of errors more flexible
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
Refactored test suite to use the assert module for testing rather than
mjsunit.
|