mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 11:40:18 +01:00
12 lines
301 B
JavaScript
12 lines
301 B
JavaScript
// Test `Reflect.ownKeys(<py-obj>)` on the JavaScript side, which tests PyProxy.ownKeys.
|
|
|
|
const mp = await (await import(process.argv[2])).loadMicroPython();
|
|
|
|
mp.runPython(`
|
|
x = []
|
|
y = {"a": 1}
|
|
`);
|
|
|
|
console.log(Reflect.ownKeys(mp.globals.get("x")));
|
|
console.log(Reflect.ownKeys(mp.globals.get("y")));
|