Create namespace with references for modules (#4646)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-04-12 15:58:56 +02:00
committed by GitHub
parent ef35c0329c
commit b3ec217b50
27 changed files with 1378 additions and 479 deletions
+17 -1
View File
@@ -17,4 +17,20 @@ import * as f from "./module-export-08.mjs";
assert (f.c === 5)
assert (f.x === 41)
assert (!Object.hasOwnProperty(f, "default"));
assert (Object.getPrototypeOf(f) === null)
try {
Object.hasOwnProperty(f, "default")
assert (false);
} catch (e) {
assert (e instanceof TypeError)
}
Object.setPrototypeOf(f, null)
try {
Object.setPrototypeOf(f, {})
assert (false);
} catch (e) {
assert (e instanceof TypeError)
}