michelsalib / chai-shallow-deep-equal

Shallow deep equal for chai
20 stars 9 forks source link

Yet another improvement for date comparing #6

Closed kossnocorp closed 10 years ago

kossnocorp commented 10 years ago

It's me again. I did tested it on different cases and found a small problem:

window This is because in this case I've used Date mocked with Sinon.JS so constructor is not equal to current value of Date.

Best way to avoid problem with successors it's to use instanceof instead of constructor.

I tried this patch with my code and it works just fine. I think we good here.

michelsalib commented 10 years ago

Thanks :)

kossnocorp commented 10 years ago

:+1: