Skip to content

Commit

Permalink
Add some docs on how to run the tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Oct 19, 2021
1 parent 2b5cad2 commit c53c583
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/visual-regression/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Visual Regression Tests in WordPress Core

These tests make use of Jest and Puppeteer, with a setup very similar to that of the e2e tests, together with [jest-image-snapshot](https://github.com/americanexpress/jest-image-snapshot) for generating the visual diffs.

## How to Run the Tests Locally

1. Check out trunk.
2. Run `npm run test:visual` to generate some base snapshots.
3. Check out the feature branch to be tested.
4. Run `npm run test:visual` again. If any tests fail, the diff images can be found in `tests/visual-regression/specs/__image_snapshots__/__diff_output__`.

0 comments on commit c53c583

Please sign in to comment.