You can use this.currentTest.state (not sure when this was introduced):
afterEach(function() {
if (this.currentTest.state === 'failed') {
// ...
}
});
You can use this.currentTest.state (not sure when this was introduced):
afterEach(function() {
if (this.currentTest.state === 'failed') {
// ...
}
});