Skip to content

Commit 43ad374

Browse files
committed
test(PyProxyHandler): fix tests/js/py2js/object-methods.simple
`==` only compares if the two JS objects have the same memory address.
1 parent eb9646a commit 43ad374

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/js/py2js/object-methods.simple.failing renamed to tests/js/py2js/object-methods.simple

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ const throughJS = (x) => x;
1313
const jsObj = throughJS(obj);
1414
const standardJSObj = { a: 1, b: 2, c: 3 };
1515

16-
if (Object.keys(jsObj) !== Object.keys(standardJSObj))
16+
if (JSON.stringify(Object.keys(jsObj)) !== JSON.stringify(Object.keys(standardJSObj)))
1717
{
1818
console.error('The output of the PythonMonkey JS object does not match the output of a standard JS Object.');
1919
throw new Error('Test failed');
2020
}
2121

22-
if (Object.values(jsObj) !== Object.values(standardJSObj))
22+
if (JSON.stringify(Object.values(jsObj)) !== JSON.stringify(Object.values(standardJSObj)))
2323
{
2424
console.error('The output of the PythonMonkey JS object does not match the output of a standard JS Object.');
2525
throw new Error('Test failed');
2626
}
2727

28-
if (Object.entries(jsObj) !== Object.entries(standardJSObj))
28+
if (JSON.stringify(Object.entries(jsObj)) !== JSON.stringify(Object.entries(standardJSObj)))
2929
{
3030
console.error('The output of the PythonMonkey JS object does not match the output of a standard JS Object.');
3131
throw new Error('Test failed');

0 commit comments

Comments
 (0)