| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
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.
|