test: add Symbol test for assert.deepEqual()
The existing test never ran because typeof Symbol === 'function' and not 'symbol'. We have Symbols now so remove the check and just run the test. PR-URL: https://github.com/nodejs/node/pull/3327 Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
8c043c1245
commit
0f99320aa0
@ -140,9 +140,7 @@ assert.throws(makeBlock(a.deepEqual, 'a', ['a']), a.AssertionError);
|
||||
assert.throws(makeBlock(a.deepEqual, 'a', {0: 'a'}), a.AssertionError);
|
||||
assert.throws(makeBlock(a.deepEqual, 1, {}), a.AssertionError);
|
||||
assert.throws(makeBlock(a.deepEqual, true, {}), a.AssertionError);
|
||||
if (typeof Symbol === 'symbol') {
|
||||
assert.throws(makeBlock(assert.deepEqual, Symbol(), {}), a.AssertionError);
|
||||
}
|
||||
assert.throws(makeBlock(a.deepEqual, Symbol(), {}), a.AssertionError);
|
||||
|
||||
// primitive wrappers and object
|
||||
assert.doesNotThrow(makeBlock(a.deepEqual, new String('a'), ['a']),
|
||||
|
Loading…
x
Reference in New Issue
Block a user