You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The condition in this line evaluates to false under certain conditions even if Array.isArray(someArray) evaluates to true and Object.prototype.toString.call(someArray) returns [Object Array].
The condition in this line evaluates to false under certain conditions even if
Array.isArray(someArray)
evaluates to true andObject.prototype.toString.call(someArray)
returns[Object Array]
.Could these edge cases be the problem?
I'm using supertest and nock to test a Cloudflare worker.
Using
Array.isArray()
instead ofinstanceof
doesn't seem to be causing any problems for tests. https://github.com/thegeorgeous/json-rules-engine/commit/c2da34fc59d94cc4f8e6f54eaca431b079220f12Happy to provide any more details if necessary.
UPDATE:
The issue seems to be a jest issue. Would you consider using
Array.isArray()
instead?The text was updated successfully, but these errors were encountered: