-
Notifications
You must be signed in to change notification settings - Fork 312
Open
Description
Hi, I have this issue.
To reproduce, please run this code: (you can run it for example here)
const { VM } = require('vm2')
const assert = require('assert').strict;
const vm = new VM()
const res = vm.run('[1, 2, 3]')
assert.deepEqual(res,[1,2,3])
It yields this error:
AssertionError: Expected values to be strictly deep-equal:
+ actual - expected
[
1,
2,
3,
+ '0': 1,
+ '1': 2,
+ '2': 3
]
I believe this problem is closely related to this issue, where collaborator @XmiliaH wrote
This is back for all versions as the fix broke Object.keys. As this is only a issue when logging objects this is acceptable.
However, as you can see, this is not only a logging issue.
idoco, onniaa and yigaldviri