v0.20.0-next.2
Pre-release
Pre-release
Release Notes
Feature: Run postVisit on failures (#494)
The test-runner's postVisit hook now runs even if there are failures. This allows you to, for instance, take snapshots on component failures. You can check whether the test has failed via the hasFailure
property in the context passed to the hook:
const config: TestRunnerConfig = {
async postVisit(_page, context) {
if(context.hasFailure) {
console.log('problems!')
// do a snapshot, write a log, or anything you like
}
},
}
🚀 Enhancement
Authors: 1
- Yann Braga (@yannbf)