Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inital setup of visual regression tests. #209

Closed
Prev Previous commit
Next Next commit
Add diff console dump.
  • Loading branch information
tellthemachines committed Nov 2, 2021
commit 210186775b3c95b9aceb1c9ab9e6fa6fe1f67d9c
6 changes: 5 additions & 1 deletion tests/e2e/config/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { get } from 'lodash';
import { toMatchImageSnapshot } from 'jest-image-snapshot';
import { configureToMatchImageSnapshot } from 'jest-image-snapshot';

import {
clearLocalStorage,
Expand Down Expand Up @@ -35,6 +35,10 @@ const pageEvents = [];
// The Jest timeout is increased because these tests are a bit slow
jest.setTimeout( PUPPETEER_TIMEOUT || 100000 );

const toMatchImageSnapshot = configureToMatchImageSnapshot({
dumpDiffToConsole: true,
});

// Extend Jest's "expect" with image snapshot functionality.
expect.extend({ toMatchImageSnapshot });

Expand Down