Skip to content

v0.20.0-next.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 28 Nov 09:40
322bd62

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