1'use strict';
2const common = require('../../common');
3const assert = require('assert');
4
5// Testing api calls for symbol
6const test_symbol = require(`./build/${common.buildType}/test_symbol`);
7
8const fooSym = test_symbol.New('foo');
9assert.strictEqual(fooSym.toString(), 'Symbol(foo)');
10
11const myObj = {};
12myObj.foo = 'bar';
13myObj[fooSym] = 'baz';
14
15assert.deepStrictEqual(Object.keys(myObj), ['foo']);
16assert.deepStrictEqual(Object.getOwnPropertyNames(myObj), ['foo']);
17assert.deepStrictEqual(Object.getOwnPropertySymbols(myObj), [fooSym]);
18