Skip to content

Commit 9287a8b

Browse files
committed
Setup image snapshot testing with puppeteer and jest-image-snapshot
1 parent ed0b75f commit 9287a8b

14 files changed

+8071
-8287
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
/site/partials/recipes.html
55
/site/docs/
66

7+
# puppeteer cache
8+
.cache
9+
10+
# jest-image-snapshot diff output
11+
__diff_output__
12+
713
# ignore yarn files (this repo uses npm)
814
yarn-error.log
915
yarn.log

jest-puppeteer.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
server: {
3+
command: 'webpack-dev-server --port 4444',
4+
port: 4444
5+
}
6+
}

jest.config.cjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const config = {
2+
preset: 'jest-puppeteer',
3+
transformIgnorePatterns: ['<rootDir>/node_modules/(?!d3-\\.*|internmap)']
4+
}
5+
6+
module.exports = config

0 commit comments

Comments
 (0)