diff options
| author | Mike Pennisi <mike@mikepennisi.com> | 2014-02-24 14:16:40 -0500 |
|---|---|---|
| committer | Fedor Indutny <fedor.indutny@gmail.com> | 2014-02-25 20:32:49 +0400 |
| commit | aae51ecf7d407b2fb56c1f3e1edf91a16940c973 (patch) | |
| tree | 43275f90f20cafe15f0b167461141027fb37f030 /test | |
| parent | 70ea5bac431ae136368fc2c88e4bbe9e4b93a9aa (diff) | |
| download | node-aae51ecf7d407b2fb56c1f3e1edf91a16940c973.tar.gz | |
assert: Ensure reflexivity of deepEqual
Ensure that the behavior of `assert.deepEqual` does not depend on
argument ordering when comparing an `arguments` object with a
non-`arguments` object.
Diffstat (limited to 'test')
| -rw-r--r-- | test/simple/test-assert.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/simple/test-assert.js b/test/simple/test-assert.js index 2885858cf..6b8350095 100644 --- a/test/simple/test-assert.js +++ b/test/simple/test-assert.js @@ -249,6 +249,11 @@ try { gotError = true; } +// GH-7178. Ensure reflexivity of deepEqual with `arguments` objects. +var args = (function() { return arguments; })(); +a.throws(makeBlock(a.deepEqual, [], args)); +a.throws(makeBlock(a.deepEqual, args, [])); + console.log('All OK'); assert.ok(gotError); |
