Add option to list symbols in Object.getOwnPropertyNames() (#3507)
Also a little refactoring of Object.getOwnPropertyNames() JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
This commit is contained in:
committed by
Robert Fancsik
parent
8b41bf306a
commit
51244b6d08
@@ -156,3 +156,12 @@ try {
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError)
|
||||
}
|
||||
|
||||
var asd = Symbol ("asd");
|
||||
var foo = Symbol ("foo");
|
||||
var bar = Symbol ("bar");
|
||||
var obj = {1: 5, "a": 6, [foo]: 7, [asd]: 8, [bar]: 9};
|
||||
var result = Object.assign ({}, obj);
|
||||
assert (result[foo] == 7);
|
||||
assert (result[asd] == 8);
|
||||
assert (result[bar] == 9);
|
||||
|
||||
Reference in New Issue
Block a user