我有一个测试用例:
describe('test suit', function() {
it('test case special', async function() {
// if this one takes longer then the mocha timeout, i want to customize the error message
const errs = [];
try {
} catch(err) {
errs.push(err);
await delay(50);
}
});
it('test case regular', function() {
});
});
我只想为那个特殊测试用例定制超时消息,对于其他测试用例,它应该抛出常规消息。我想扔掉收集的errs
的内容。这可能吗?