Automattic / expect.js

Minimalistic BDD-style assertions for Node.JS and the browser.
2.11k stars 209 forks source link

Your isArray implementation and IE6 #55

Open ELLIOTTCABLE opened 11 years ago

ELLIOTTCABLE commented 11 years ago

One of the major selling-points of Expect.js for me, is that it's compatible with older browsers that I need to run my unit tests in.

So, just a heads-up: your implementation of isArray(), used in several places in the codebase, will not work with foreign-context arrays in IE6 and IE7. You should either replace it with a simple instanceof, or if you truly want to support foreign-context arrays (please do, I use these. :), try something else.

(Offending lines: expect.js#746, expect.js#1060)

rauchg commented 11 years ago

+1

rauchg commented 11 years ago

I like solution #1.