Closed s-leroux closed 6 years ago
Hello Sylvain,
I think it's related to https://github.com/asciidoctor/asciidoctor.js/issues/299 and https://github.com/chaijs/chai/issues/1109 In short, Opal uses circular references and when you use deep equals, Chai will loop indefinitely.
Thank you for your replay Guillaume.
I investigate the issue a little bit more after my initial message. Apparently, after having done some tests, Chai does not break on circular references. And I follow the code on the debugger, and it does not seem to be stuck in an infinite loop.
However, I notice opal is attaching something like 800 methods to the Array
and Function
prototypes (or maybe just to Object
?)--and a deep inspection could result in a combinatory explosion.
I assume there is no easy way to reduce the Opal footprint on the standard objects prototypes?
Indeed definitely the same issue as https://github.com/chaijs/chai/issues/1109
The next version of Opal will fix this issue: https://github.com/opal/opal/pull/1821
I believe this issue was fixed in https://github.com/Mogztter/opal-node-runtime/releases/tag/v1.0.7 Could you please give it a try (an reopen this issue if it's not the case) ?
Hi Guillaume,
I noticed when I load the opal-runtime some assertions of the Chai testing framework break. Because of changes you made on the standard Array object prototype, I assumed.
Anyway, I submitted an issue on the Chai project: https://github.com/chaijs/chai/issues/1153
Could you check if you observe the same behavior, or if this is just something weird on my system?