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].
Could these edge cases be the problem?
I'm using supertest and nock to test a Cloudflare worker.
Using Array.isArray() instead of instanceof doesn't seem to be causing any problems for tests. https://github.com/thegeorgeous/json-rules-engine/commit/c2da34fc59d94cc4f8e6f54eaca431b079220f12
Happy to provide any more details if necessary.
UPDATE:
The issue seems to be a jest issue. Would you consider using Array.isArray() instead?