I want ok(), equals(), etc. to return true/false/undefined based on whether the test passed. I find that often certain subsequent tests only make sense if an earlier one succeeds. For example, I have a function that should grow a list, so I am wanting to write something like:
var oldLen = wad.currentLengt();
wad.addStuff(stuff);
if (!equals(wad.currentLength(), oldLen + 1)) return;
var newStuff = wad.getLatestStuff();
equals(newStuff, stuff);
ok(newStuff.delta > 0);
…
I could add my own “if” to the above after the length test, but (if I’m working synchronously) qunit already knows the answer, it’s just not telling me. (Not to mention all the other standard problems with repeating code.)