File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
test/js-native-api/test_symbol Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,12 @@ const assert = require('assert');
66const test_symbol = require ( `./build/${ common . buildType } /test_symbol` ) ;
77
88const fooSym = test_symbol . New ( 'foo' ) ;
9+ assert . strictEqual ( fooSym . toString ( ) , 'Symbol(foo)' ) ;
10+
911const myObj = { } ;
1012myObj . foo = 'bar' ;
1113myObj [ 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 ] ) ;
You can’t perform that action at this time.
0 commit comments