505 changes: 505 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
"@babel/preset-react": "^7.8.3",
"@testing-library/react": "^9.4.0",
"jest": "^25.1.0",
"jest-image-snapshot": "^2.12.0",
"jest-transform-css": "^2.0.0",
"jest-transform-file": "^1.1.1",
"jsdom-screenshot": "^3.2.0",
"parcel-bundler": "^1.12.4"
}
}
2 changes: 2 additions & 0 deletions setupTests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { toMatchImageSnapshot } from 'jest-image-snapshot';
expect.extend({ toMatchImageSnapshot });
6 changes: 5 additions & 1 deletion src/App.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import React from 'react';
import { generateImage } from 'jsdom-screenshot';
import { render } from '@testing-library/react';
import App from './App';

it('runs', async () => {
it('has no visual regressions', async () => {
render(<App />);

const screenshot = await generateImage();
expect(screenshot).toMatchImageSnapshot();
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.