Closed kossnocorp closed 10 years ago
It's me again. I did tested it on different cases and found a small problem:
This is because in this case I've used Date mocked with Sinon.JS so constructor is not equal to current value of Date.
Date
Best way to avoid problem with successors it's to use instanceof instead of constructor.
instanceof
constructor
I tried this patch with my code and it works just fine. I think we good here.
Thanks :)
:+1:
It's me again. I did tested it on different cases and found a small problem:
This is because in this case I've used
Date
mocked with Sinon.JS so constructor is not equal to current value ofDate
.Best way to avoid problem with successors it's to use
instanceof
instead ofconstructor
.I tried this patch with my code and it works just fine. I think we good here.