On 2014-06-02, 5:33 PM, Gavin Sharp wrote:
Do either of you have reasoning for that other than "it looks better
to me"? I personally think consistency trumps any personal preferences
based on length/concision, as long as what we end up with isn't
unreasonably long/verbose.
I have two reasons:
1. I believe verbosity for test assertion functions is a bad thing.
is/ok are easier to type/read than the Assert.jsm types. I assume that
people familiar with CommonJS (which Assert.jsm seems to be based on)
would perhaps be trained to ignore the verbosity of those functions, but
people who write mochitest-chrome tests very frequently would probably
not fall into that category.
2. I also value consistency more than my personal preferences, and based
on that, using the existing APIs in some tests and the new APIs in other
tests (even if we agreed that #1 above doesn't matter) is strictly worse
than the status quo.
Also, I'm not sure where the original discussion happened, and what the
reasons are, but if the goal is to be more consistent, it seems like we
need to move xpcshell tests to use the SimpleTest APIs since that seems
to be the only test framework that we have which currently doesn't use
it (ignoring testharness.js of course, and reftests don't really have an
assertion API). I don't think adding a third (fourth considering th.js)
and trying to transition mochitest-browser/chrome to it gradually gets
us close to that goal.
Cheers,
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform