On 6/6/14, 7:12 AM, Gijs Kruitbosch wrote:
No, I think that in 99.99% of cases, I don't care about the type, and
therefore I would normally use is() and not care that it's using
non-strict equality. I think the case where there is (a) a possibility
that I could get '5' instead of 5 when code is malfunctioning, and (b)
that would be a bug, is extremely rare
The common cases where this would be a bug are not 5 vs '5'. They're
null vs undefined (the most common; we've accidentally exposed APIs when
we thought we had a test for them not being exposed because of this
one!) or 0 vs ""/null/undefined.
and therefore that extremely rare case should require the additional code
The problem is, the rare cases are the ones test writers never think about.
The is() using == thing has bitten us far too many times. I'm just
going to work on getting it fixed.
-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform