On 14/05/15 00:35, Gregory Szorc wrote:
I would steer people in the direction of Assert.jsm, specifically Assert.deepEqual, which uses ObjectUtils.jsm goodness for type aware comparisons so things like Date, RegExp, and Object comparisons have sane behavior. (deepEqual falls back to === for non-special types.
If you are writing tests for web-exposed APIs you should strongly consider writing web-platform-tests instead of mochitests. These provide an assert_equals function for equality testing which does what the ES spec calls "SameValue" equality; like === for most cases but with -0 != 0 and NaN === NaN.
_______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform