-
-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
assert.deepEqual hangs when comparing arrays if the array prototype was modified by Opal #1153
Comments
Maybe related to chaijs/deep-eql#51. (Edit: Probably not, see below) A fix would be to use |
Maybe @demurgos. Maybe not. I tried to follow the code with the debugger. It does not seem to be stuck in an infinite loop. But I also noticed Chai found 850 visible properties on arrays and 800 on functions. So the issue might "just" be caused by a combinatorial explosion. |
Related to #1109 |
Hey @s-leroux thanks for the issue. I'm sure this is actually a duplicate of #1109. |
Opal is a Ruby to JS converter. opal-runtime by @Mogztter is a helper library providing the runtime environment to run Ruby->JS converted programs.
Apparently, it modifies the prototype of the standard objects in such a way assert.deepEqual hangs (presumably on a circular reference):
I assume other libraries modifying the standard object's prototype in a similar way could cause Chai to hang too.
Tested with node v8.9.4, opal-runtime 1.0.1 and chai 4.1.2
The text was updated successfully, but these errors were encountered: