What I want to do is console.log
something if there is a failure in an AVA test but I can't find any documentation on how to do this - if its possible.
test.afterEach.always(t => {
if(t.hasFailure()){ //something like this
console.log(JSON.stringify(t.context.someJSON));
}
});
test('it fails', t => {
t.context.someJSON = {sample: 'object'}
t.fail('forced failure');
});