Skip to content

Commit 94645d8

Browse files
RaisinTenruyadorno
authored andcommitted
test: replace commented out expectations with tests
Signed-off-by: Darshan Sen <[email protected]> PR-URL: #41667 Reviewed-By: Mestery <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 26c5efe commit 94645d8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/js-native-api/test_symbol/test2.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ const assert = require('assert');
66
const test_symbol = require(`./build/${common.buildType}/test_symbol`);
77

88
const fooSym = test_symbol.New('foo');
9+
assert.strictEqual(fooSym.toString(), 'Symbol(foo)');
10+
911
const myObj = {};
1012
myObj.foo = 'bar';
1113
myObj[fooSym] = 'baz';
12-
Object.keys(myObj); // -> [ 'foo' ]
13-
Object.getOwnPropertyNames(myObj); // -> [ 'foo' ]
14-
Object.getOwnPropertySymbols(myObj); // -> [ Symbol(foo) ]
15-
assert.strictEqual(Object.getOwnPropertySymbols(myObj)[0], fooSym);
14+
15+
assert.deepStrictEqual(Object.keys(myObj), ['foo']);
16+
assert.deepStrictEqual(Object.getOwnPropertyNames(myObj), ['foo']);
17+
assert.deepStrictEqual(Object.getOwnPropertySymbols(myObj), [fooSym]);

0 commit comments

Comments
 (0)