3 ms·
So this is like the iframe Array isn't the same as the parent window's Array issue? I guess both Array types are same in semantics, but have different prototype
by EdwardDiego 3y ago
So this is like the iframe Array isn't the same as the parent window's Array issue? I guess both Array types are same in semantics, but have different prototypes for isolation so code in one context can't dick with code in another context in a language where dicking with other code trivially used to be very commonplace. Good ol Prototype.js used to love extending every DOMElement prototype it could.
Do you need to use an instanceof in the example code? I feel like it's already covered that in the first assertion, unless there's some horrifying way that another type could be implicitly coerced into an array looking shape.
expect(values.bar).toEqual(['a', 'b'])