Browse Source

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>
v5.x
Rich Trott 9 years ago
committed by Rod Vagg
parent
commit
ee2e641e0a
  1. 4
      test/parallel/test-assert.js

4
test/parallel/test-assert.js

@ -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…
Cancel
Save