Assume I have a test file as follows:
describe('my tests', function() {
it('t1 ...', cb);
it('t2 ...', cb);
it('t3 ...', cb);
it('t4 ...', cb);
// ...
})
Suppose I got errors in t2 and t3. My goal is to fix the error tests serially one after the other. So I have to fix t2 and then t3, and, so on.
But in the mocha report, the errors are sorted serially as how they occur in the test file. So t2 error is reported before t3, and, so on.
The problem is if there are many tests (10+) (it gets worse with very long stacktraces) I'd have to scroll a lot to find the first error (t2). I am looking at some command line switch which will report t2 to the end, and, all the later errors to the top.
from Can we sort test errors in mocha?
No comments:
Post a Comment