{"_id":"@craft.co/jest-screenshot-odiff","_rev":"4-881702c5142b5252871f64f5a54c5a3c","name":"@craft.co/jest-screenshot-odiff","dist-tags":{"latest":"0.3.5-patch.2"},"versions":{"0.3.5":{"name":"@craft.co/jest-screenshot-odiff","keywords":["test","css","visual testing","visual regression","jest","browser testing","puppeteer","snapshot","screenshot","diff","image"],"version":"0.3.5","description":"Forked version of jest-screenshot that is using odiff under the hood.","main":"dist/index.js","author":{"name":"Frederick Gnodtke"},"license":"MIT","scripts":{"build":"tsc -p tsconfig-production.json --sourceMap","test":"jest -i","lint":"tslint --format stylish --type-check --project tsconfig.json","clean":"rm -rf dist","docs":"typedoc --out docs/ --exclude '**/test-*.ts,**/report-viewer/**/*' src/"},"repository":{"type":"git","url":"git+https://github.com/Prior99/jest-screenshot.git"},"jest":{"coverageThreshold":{"global":{"statements":100,"lines":100,"functions":100}},"collectCoverage":true,"moduleFileExtensions":["ts","tsx","js"],"transform":{"^.+\\.(ts|tsx)$":"ts-jest"},"testMatch":["**/__tests__/test-*.(ts|js|tsx)"],"testPathIgnorePatterns":["/example/"],"coveragePathIgnorePatterns":["/node_modules/","<rootDir>/jest-framework-setup.ts","<rootDir>/src/index.ts"],"reporters":["default","<rootDir>/dist/reporter"],"snapshotSerializers":["enzyme-to-json/serializer"],"moduleNameMapper":{"^.+\\.(css|scss|sass)$":"identity-obj-proxy","bulma":"identity-obj-proxy"},"setupFilesAfterEnv":["<rootDir>/jest-framework-setup.ts"]},"devDependencies":{"@jest/reporters":"^26.6.2","@jest/test-result":"^26.6.2","@types/classnames":"^2.2.3","@types/enzyme":"^3.1.9","@types/enzyme-adapter-react-16":"^1.0.2","@types/jest":"^26.0.15","@types/lodash.kebabcase":"^4.1.3","@types/mkdirp":"^0.5.2","@types/node":"^13.7.0","@types/react":"^16.3.10","@types/react-dom":"^16.0.5","@types/rimraf":"^2.0.2","ansi-to-react":"^6.0.0","bulma":"^0.8.0","classnames":"^2.2.5","coveralls":"^3.0.0","css-loader":"^5.2.6","enzyme":"^3.3.0","enzyme-adapter-react-16":"^1.1.1","enzyme-to-json":"^3.3.3","identity-obj-proxy":"^3.0.0","jest":"^26.6.3","lodash-decorators":"^6.0.1","mini-css-extract-plugin":"^2.1.0","mobx":"^5.15.4","mobx-react":"^6.1.7","node-sass":"8.0.0","react":"^16.3.1","react-dom":"^16.3.1","resolve-url-loader":"^4.0.0","rimraf":"^3.0.2","sass-loader":"^12.1.0","ts-jest":"^26.4.4","ts-loader":"^9.4.2","tsdi":"^0.22.0","tslint":"^6.0.0","typedoc":"^0.21.2","typescript":"4.9.5","webpack":"5.42.1","webpack-cli":"^4.7.2"},"dependencies":{"chalk":"^3.0.0","lodash.kebabcase":"^4.1.1","mkdirp":"^1.0.4","odiff-bin":"^2.5.1"},"types":"./dist/index.d.ts","gitHead":"5f3f739f904c356b71506e5747588d3b8e48d705","bugs":{"url":"https://github.com/Prior99/jest-screenshot/issues"},"homepage":"https://github.com/Prior99/jest-screenshot#readme","_id":"@craft.co/jest-screenshot-odiff@0.3.5","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-S8V5SM+IGJjtG+h/PN9S6o7uZsseXiv+boFS1N40qoyt9P6CwEV/Ag1OgKwjOtdo7hJl421997E3fWJLB45+Lg==","shasum":"7491073f61b4e00cfbafd7f07b1aeef61af5193b","tarball":"https://registry.npmjs.org/@craft.co/jest-screenshot-odiff/-/jest-screenshot-odiff-0.3.5.tgz","fileCount":126,"unpackedSize":4826714,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDd0G8OURuYySCoct/a4JYAEgWKvUidQzYV0Ks+SrqXzAIgC/nuBBPM+9NA6mQN4c4fZjdEMK5aCHE0/OjE1pD+U0E="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9LEiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoFEA/+IVrupc8vzOo8UOZDARPakqZZGhmCyKQgHHV1GzUFN741H7q6\r\nElQy2CNnEKYgbENv1S/jknRq7apE3v4b5UyqiYN8tiELGFJ4G0YbCDCuJapn\r\nrYdSkKP+COY3fIkTLQMRVOQFtLZOJ33JxwwJd/JTye1zmV5DKtqccui9nYY6\r\nbYKGsrVNkh3dkDh1F8lQKMutAukfNaUL2EfsePqPCLCe61+m/vtccBzxgXtu\r\ndbYoQPcQLx6k5/479WGRGZYgRnTF4HsEkwuiyVTVgQoTzeokpZXuT2hnA0Hj\r\nU0RUx6rmLq4UoAjF7ZP1ZHnc/VniMBP2kZVNwrZZL6O28GtVpVdyUR06TVj0\r\nxYNGZArkhbPSm36hFNyNE3LLz0riASNP0KjorD2YbTDBBcZYv298oDWp+QID\r\npLeaFQGjry6d064nU8ECNDcy3MFUCuOrB7VOZMjI5A4sm87QaVX/JzgHNHQ0\r\nHjrx2NMuqrhPUNJDR10wCZ6rYW8AX/nlT+hpHv4r+IMdXWoYzf3OZ2lkbDBO\r\ncMpF8Mq1uFa48G0dvA6Np6XeuFysrXbYCmhFJJi2Krws+oAssQ4I+s/wsQJ6\r\nb8f7TP1x+Jc2/vb6IFaJfYekkUs5lXKMGqTqx+fP5hlw7I0kYB8v1RN3l4CD\r\nBdonOy1/wUHPO/E3dyO7/PFEXYEGbTlCUc0=\r\n=U6NT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ic.craft","email":"ivan.charapanau@craft.co"},"directories":{},"maintainers":[{"name":"mikejansen","email":"mike.jansen@craft.co"},{"name":"ic.craft","email":"ivan.charapanau@craft.co"},{"name":"alex.klimenkov","email":"alex.klimenkov@craft.co"},{"name":"kirill.utenkov.craft","email":"kirill.utenkov@craft.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-screenshot-odiff_0.3.5_1676980513878_0.8261800209339023"},"_hasShrinkwrap":false},"0.3.5-patch.1":{"name":"@craft.co/jest-screenshot-odiff","keywords":["test","css","visual testing","visual regression","jest","browser testing","puppeteer","snapshot","screenshot","diff","image"],"version":"0.3.5-patch.1","description":"Forked version of jest-screenshot that is using odiff under the hood.","main":"dist/index.js","author":{"name":"Frederick Gnodtke"},"license":"MIT","scripts":{"build":"tsc -p tsconfig-production.json --sourceMap","test":"jest -i","lint":"tslint --format stylish --type-check --project tsconfig.json","clean":"rm -rf dist","docs":"typedoc --out docs/ --exclude '**/test-*.ts,**/report-viewer/**/*' src/"},"repository":{"type":"git","url":"git+https://github.com/Prior99/jest-screenshot.git"},"jest":{"coverageThreshold":{"global":{"statements":100,"lines":100,"functions":100}},"collectCoverage":true,"moduleFileExtensions":["ts","tsx","js"],"transform":{"^.+\\.(ts|tsx)$":"ts-jest"},"testMatch":["**/__tests__/test-*.(ts|js|tsx)"],"testPathIgnorePatterns":["/example/"],"coveragePathIgnorePatterns":["/node_modules/","<rootDir>/jest-framework-setup.ts","<rootDir>/src/index.ts"],"reporters":["default","<rootDir>/dist/reporter"],"snapshotSerializers":["enzyme-to-json/serializer"],"moduleNameMapper":{"^.+\\.(css|scss|sass)$":"identity-obj-proxy","bulma":"identity-obj-proxy"},"setupFilesAfterEnv":["<rootDir>/jest-framework-setup.ts"]},"devDependencies":{"@jest/reporters":"^26.6.2","@jest/test-result":"^26.6.2","@types/classnames":"^2.2.3","@types/enzyme":"^3.1.9","@types/enzyme-adapter-react-16":"^1.0.2","@types/jest":"^26.0.15","@types/lodash.kebabcase":"^4.1.3","@types/mkdirp":"^0.5.2","@types/node":"^13.7.0","@types/react":"^16.3.10","@types/react-dom":"^16.0.5","@types/rimraf":"^2.0.2","ansi-to-react":"^6.0.0","bulma":"^0.8.0","classnames":"^2.2.5","coveralls":"^3.0.0","css-loader":"^5.2.6","enzyme":"^3.3.0","enzyme-adapter-react-16":"^1.1.1","enzyme-to-json":"^3.3.3","identity-obj-proxy":"^3.0.0","jest":"^26.6.3","lodash-decorators":"^6.0.1","mini-css-extract-plugin":"^2.1.0","mobx":"^5.15.4","mobx-react":"^6.1.7","node-sass":"8.0.0","react":"^16.3.1","react-dom":"^16.3.1","resolve-url-loader":"^4.0.0","rimraf":"^3.0.2","sass-loader":"^12.1.0","ts-jest":"^26.4.4","ts-loader":"^9.4.2","tsdi":"^0.22.0","tslint":"^6.0.0","typedoc":"^0.21.2","typescript":"4.9.5","webpack":"5.42.1","webpack-cli":"^4.7.2"},"dependencies":{"chalk":"^3.0.0","lodash.kebabcase":"^4.1.1","mkdirp":"^1.0.4","odiff-bin":"^2.5.1"},"types":"./dist/index.d.ts","gitHead":"7dc12addbeb38778dc97a951ff5a6b9851901498","bugs":{"url":"https://github.com/Prior99/jest-screenshot/issues"},"homepage":"https://github.com/Prior99/jest-screenshot#readme","_id":"@craft.co/jest-screenshot-odiff@0.3.5-patch.1","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-j0lcGujKlUHwtm4pRRJtwNPRruEwtHSASUy2b63hSzmb1eyH7mwglQcjdsj3sDnlikzKSOL7L46hvKiZ6IR94g==","shasum":"4439b1d27a5b929cc4678990e0419fe72411a6ec","tarball":"https://registry.npmjs.org/@craft.co/jest-screenshot-odiff/-/jest-screenshot-odiff-0.3.5-patch.1.tgz","fileCount":126,"unpackedSize":4827038,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDliFtKQZZRGHr59m3FixGXHFlkOFii8xhiN8yjVQIy3AiBOpl+3GGiSaJQs7ElQ8jzbZmu0DX2yWV/8Bc+5eTLp8Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFKXJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVUg//dTfPdPogH8UhArihaVqaFUCUKbk3wym/Wt95TInTo/USdjSF\r\nj7tr/REOxwJaYPajRLhU7BLkPlAfhH7phTj+UfnVP3w6kIQH8B7GGJoiJdyv\r\n44G1yyC3FlfuBnnXXdwR3eMbgOBnvU9EGOAxI4q8TyyNuCidS//buv7sAf/1\r\nt9Ig12PPtssjGNjGBnR3TJlO1knuk/crk/Gp8L+AVAAz3yfn8dFjnFK7HPTT\r\nD//Vng1gal4vpcTbLXSJ/tbyBgo1hiCiFg0xx9XyJTjz9294f4ENtnP7d23P\r\nnQeaDp6DwBwJmB0nqk0cNmz+pu7cyQAOPbLBf9BsRZAD9AMMeSTtf7y11PI0\r\nMM0BPQ98p8GLpQv54DmIvTLx8/B00mlXbtyQlEUdaXV6e2T41ggOMMO1UOqL\r\nNIt0DUtXGkJokcjdJLuhBqqmdxOAGBnG87TW/iX0Efn4tBOCtE+sH1SaYTER\r\nHtOPuqr0kR8L2GyUnswS50AsmhfJflnxSBlWmG4hFcsUzYIfZPcVf10O6K2W\r\nPSCVntedefP8MXkuf//ulDktdiOfMfhndE7WyE8imlVzqHP0hTFRSo10bL/C\r\n3pIiaY7ZAESFFIRxk171OnK95HfqvxhKZ7TYWTjKTdSzvIpOSdeN0QmigEEp\r\ne/FlEewM9E0o8746bfDe+SUOTJ7PX9EHK88=\r\n=kcYt\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ic.craft","email":"ivan.charapanau@craft.co"},"directories":{},"maintainers":[{"name":"mikejansen","email":"mike.jansen@craft.co"},{"name":"ic.craft","email":"ivan.charapanau@craft.co"},{"name":"alex.klimenkov","email":"alex.klimenkov@craft.co"},{"name":"kirill.utenkov.craft","email":"kirill.utenkov@craft.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-screenshot-odiff_0.3.5-patch.1_1679074761097_0.8983247589743917"},"_hasShrinkwrap":false},"0.3.5-patch.2":{"name":"@craft.co/jest-screenshot-odiff","keywords":["test","css","visual testing","visual regression","jest","browser testing","puppeteer","snapshot","screenshot","diff","image"],"version":"0.3.5-patch.2","description":"Forked version of jest-screenshot that is using odiff under the hood.","main":"dist/index.js","author":{"name":"Frederick Gnodtke"},"license":"MIT","scripts":{"build":"tsc -p tsconfig-production.json --sourceMap","test":"jest -i","lint":"tslint --format stylish --type-check --project tsconfig.json","clean":"rm -rf dist","docs":"typedoc --out docs/ --exclude '**/test-*.ts,**/report-viewer/**/*' src/"},"repository":{"type":"git","url":"git+https://github.com/Prior99/jest-screenshot.git"},"jest":{"coverageThreshold":{"global":{"statements":100,"lines":100,"functions":100}},"collectCoverage":true,"moduleFileExtensions":["ts","tsx","js"],"transform":{"^.+\\.(ts|tsx)$":"ts-jest"},"testMatch":["**/__tests__/test-*.(ts|js|tsx)"],"testPathIgnorePatterns":["/example/"],"coveragePathIgnorePatterns":["/node_modules/","<rootDir>/jest-framework-setup.ts","<rootDir>/src/index.ts"],"reporters":["default","<rootDir>/dist/reporter"],"snapshotSerializers":["enzyme-to-json/serializer"],"moduleNameMapper":{"^.+\\.(css|scss|sass)$":"identity-obj-proxy","bulma":"identity-obj-proxy"},"setupFilesAfterEnv":["<rootDir>/jest-framework-setup.ts"]},"devDependencies":{"@jest/reporters":"^26.6.2","@jest/test-result":"^26.6.2","@types/classnames":"^2.2.3","@types/enzyme":"^3.1.9","@types/enzyme-adapter-react-16":"^1.0.2","@types/jest":"^26.0.15","@types/lodash.kebabcase":"^4.1.3","@types/mkdirp":"^0.5.2","@types/node":"^13.7.0","@types/react":"^16.3.10","@types/react-dom":"^16.0.5","@types/rimraf":"^2.0.2","ansi-to-react":"^6.0.0","bulma":"^0.8.0","classnames":"^2.2.5","coveralls":"^3.0.0","css-loader":"^5.2.6","enzyme":"^3.3.0","enzyme-adapter-react-16":"^1.1.1","enzyme-to-json":"^3.3.3","identity-obj-proxy":"^3.0.0","jest":"^26.6.3","lodash-decorators":"^6.0.1","mini-css-extract-plugin":"^2.1.0","mobx":"^5.15.4","mobx-react":"^6.1.7","node-sass":"8.0.0","react":"^16.3.1","react-dom":"^16.3.1","resolve-url-loader":"^4.0.0","rimraf":"^3.0.2","sass-loader":"^12.1.0","ts-jest":"^26.4.4","ts-loader":"^9.4.2","tsdi":"^0.22.0","tslint":"^6.0.0","typedoc":"^0.21.2","typescript":"4.9.5","webpack":"5.42.1","webpack-cli":"^4.7.2"},"dependencies":{"chalk":"^3.0.0","lodash.kebabcase":"^4.1.1","mkdirp":"^1.0.4","odiff-bin":"^2.5.1"},"types":"./dist/index.d.ts","gitHead":"7dc12addbeb38778dc97a951ff5a6b9851901498","bugs":{"url":"https://github.com/Prior99/jest-screenshot/issues"},"homepage":"https://github.com/Prior99/jest-screenshot#readme","_id":"@craft.co/jest-screenshot-odiff@0.3.5-patch.2","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-ISQRzncW0HWoRLJrF817DuAEZLpIF02iA27q1e4LsbWMPmaUf+gbhWOA0do1XcPtnuws101TYCJW/l19z07jZw==","shasum":"34676da2a88a5069782da903af61dc6066a0fa12","tarball":"https://registry.npmjs.org/@craft.co/jest-screenshot-odiff/-/jest-screenshot-odiff-0.3.5-patch.2.tgz","fileCount":126,"unpackedSize":4827138,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCv1aXLYyTkcbVTkR6DNHauUrH8D9W+cS68LtHn0CzG5AIgD6SIw/bj6MtO+DkpVWyDYTqj2ZWyL4+ttEWu5fLGe7c="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFKblACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrl5g//Y7xzz93pu6Pfyg2ZNOH+956lI6tSkJqsh/edzEA0W8pVPUP5\r\n24Xn1NH5ruJVyOxuIJvCCcmx9iyy16gNdfNFz1aKSKAQqd0fbSbqObs2asEu\r\nCAp8WVexe0gfisHHIPULyOPS/BTWcBJ3CH2BF6W/VxMZ0q+40R+M1lBrhkJZ\r\n6FVbml2OD4kEfTVfagu6kuGroUi2sb4s0evhTV+QhB+k5HCd344EKoCr005w\r\nX9MHB3WVlWh865jCX7E2HiBqZlDrB2Op7bCJS3bWxmGMyxWCAzPVZwYZ7mIg\r\ny9Ne48sCEtpPwWkNpmL7fE3KBq8RVeb9jyExyPJTyLR5yriMvHgDrvDmLmsL\r\nQqFw8p5hDhjiT+Tiafk4v9IQ+1Q4ROgtozZUDneFflaSFpwpSOdCC49kgx7E\r\nBNbsTN+6tI8qRQthSeYShimmVPJhNY6ncr8IMFuup62xZHZP9b8kRzMxTZ3y\r\nWOoOgOwcz2bRP2qhuVuaDRNQjinKHI319hnkdU1XdFbMpKumyw714MJfzFkE\r\ngmn6NgKw3mGUFPlRPkGCf57pvMzmjctPCBbI+SqG7rPZW/EBzSOf235r0Hve\r\nRyF4Eug74gqr/VOVC5oYJr2Cux0zTZ6gscvR/71TCNOMN3BpEd4NGMAkjSCH\r\nAYsRyDxJEAdhzF9qPiuAs2rkbAN/Z8jm1HU=\r\n=pomQ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ic.craft","email":"ivan.charapanau@craft.co"},"directories":{},"maintainers":[{"name":"mikejansen","email":"mike.jansen@craft.co"},{"name":"ic.craft","email":"ivan.charapanau@craft.co"},{"name":"alex.klimenkov","email":"alex.klimenkov@craft.co"},{"name":"kirill.utenkov.craft","email":"kirill.utenkov@craft.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-screenshot-odiff_0.3.5-patch.2_1679075045218_0.9792493441987618"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-21T11:55:13.827Z","0.3.5":"2023-02-21T11:55:14.087Z","modified":"2024-05-07T13:03:38.426Z","0.3.5-patch.1":"2023-03-17T17:39:21.390Z","0.3.5-patch.2":"2023-03-17T17:44:05.478Z"},"maintainers":[{"email":"ryan.williams@craft.co","name":"rw.craft"},{"email":"mike.jansen@craft.co","name":"mikejansen"},{"email":"ivan.charapanau@craft.co","name":"ic.craft"}],"description":"Forked version of jest-screenshot that is using odiff under the hood.","homepage":"https://github.com/Prior99/jest-screenshot#readme","keywords":["test","css","visual testing","visual regression","jest","browser testing","puppeteer","snapshot","screenshot","diff","image"],"repository":{"type":"git","url":"git+https://github.com/Prior99/jest-screenshot.git"},"author":{"name":"Frederick Gnodtke"},"bugs":{"url":"https://github.com/Prior99/jest-screenshot/issues"},"license":"MIT","readme":"# @craft.co/jest-screenshot-odiff\n\n---\n\n> This is a forked version of https://github.com/Prior99/jest-screenshot that was switched from `native-image-diff` and `node-libpng` to https://github.com/dmtrKovalenko/odiff\n\n---\n\n## Build/Publish\n\nOn Node 18\n\n```bash\nNODE_OPTIONS=--openssl-legacy-provider yarn webpack\nyarn build\nnpm publish --access public\n```\n\n## Original Readme\n\n[![npm](https://img.shields.io/npm/v/jest-screenshot.svg)](https://www.npmjs.com/package/jest-screenshot)\n[![Build Status](https://travis-ci.org/Prior99/jest-screenshot.svg?branch=master)](https://travis-ci.org/Prior99/jest-screenshot)\n[![Coverage Status](https://coveralls.io/repos/github/Prior99/jest-screenshot/badge.svg?branch=master)](https://coveralls.io/github/Prior99/jest-screenshot?branch=master)\n\nA jest extension to deal with screenshots and all sorts of images. Inspired by the awesome [jest-image-snapshot](https://github.com/americanexpress/jest-image-snapshot) and\nproviding a mostly compatible API with similar features. By utilizing [native-image-diff](https://github.com/Prior99/native-image-diff) instead of [pixelmatch](https://github.com/mapbox/pixelmatch)\nand [node-libpng](https://github.com/Prior99/node-libpng) instead of [pngjs](https://github.com/lukeapage/pngjs) the tests will run much faster than its competitor.\n\nPlease also refer to the **[Documentation](https://prior99.github.io/jest-screenshot/docs/index.html)**.\n\n## Table of contents\n\n * [jest-screenshot](#jest-screenshot)\n    * [Table of contents](#table-of-contents)\n    * [Installation](#installation)\n        * [Installing the expect extension](#installing-the-expect-extension)\n        * [Installing the reporter](#installing-the-reporter)\n        * [Configuring](#configuring)\n            * [Example](#example)\n    * [Usage](#usage)\n    * [Benchmark](#benchmark)\n    * [Reports](#reports)\n    * [Contributing](#contributing)\n    * [Contributors](#contributors)\n\n## Installation\n\nTwo steps are necessary in order to use this plugin:\n\n 1. Install the `expect().toMatchImageSnapshot()` extension. ([Here](#installing-the-expect-extension))\n 2. Install the reporter. ([Here](#installing-the-reporter))\n\n### Installing the expect extension\n\nIntegrate this plugin by calling `setupJestScreenshot` in the framework setup file:\n\n```typescript\nimport { setupJestScreenshot } from \"jest-screenshot\";\n\nsetupJestScreenshot();\n```\n\nStore the above code in a `setup-framework.js` file and specify it when configuring Jest:\n\n```json\n\"jest\": {\n\n    \"setupTestFrameworkScriptFile\": \"<rootDir>/setup-framework.js\"\n\n}\n```\n\n_TypeScript Tip: to enable jest matcher types for `toMatchImageSnapshot()`, use a `*.ts` for your setup file._\n\n### Installing the reporter\n\nIn order to generate the report, the reporter must be registered in the Jest configuration:\n\n```json\n\"jest\": {\n\n    \"reporters\": [\n        \"default\",\n        \"jest-screenshot/reporter\"\n    ]\n\n}\n```\n\n### Configuring\n\nBy placing a file **jest-screenshot.json** in the root directory of your project with a [configuration object](https://prior99.github.io/jest-screenshot/docs/interfaces/jestscreenshotconfiguration.html)\nyou can configure it:\n\n| Parameter                | type     | default                  | Description\n|--------------------------|----------|--------------------------|-----------------------------------------|\n| `detectAntialiasing`     | boolean  | `true`                   | Whether to attempt to detect antialiasing and ignore related changes when comparing both images. [See documentation](https://prior99.github.io/native-image-diff/docs/interfaces/diffimagesarguments.html#detectantialiasing). |\n| `colorThreshold`         | number   | `0.1`                    | A number in the range from `0` to `1` describing how sensitive the comparison of two pixels should be. [See documentation](https://prior99.github.io/native-image-diff/docs/interfaces/diffimagesarguments.html#colorthreshold). |\n| `pixelThresholdAbsolute` | number   | `undefined`              | If specified, **jest-screenshot** will fail if more than the specified pixels are different from the snapshot. |\n| `pixelThresholdRelative` | number   | `0`                      | If specified, **jest-screenshot** will fail if more than the specified relative amount of pixels are different from the snapshot. When setting this to `0.5` for example, more than 50% of the pixels need to be different for the test to fail. |\n| `snapshotsDir`           | string   | `__snapshots__`          | If specified, will change the directory into which the snapshot images will be stored, relative to the unit test file. |\n| `reportDir`              | string   | `jest-screenshot-report` | If specified, will change the directory into which the HTML report will be written, relative to the project's root directory.  |\n| `noReport`               | boolean  | `false`                  | Set this to `true` in order to completely disable the HTML report.  |\n\nIt's also possible to specify a key `jestScreenshot` in the **package.json** with the same interface.\n\nAll configuration options are optional.\n\nIf neither `pixelThresholdAbsolute` nor `pixelThresholdRelative` are specified, `pixelThresholdRelative` will be set to `0`.\nBoth can be specified together in order to make the test fail on both conditions.\n\n#### Example\n\n```json\n{\n    \"detectAntialiasing\": false,\n    \"colorThreshold\": 0,\n    \"pixelThresholdAbsolute\": 150,\n    \"pixelThresholdRelative\": 0.5\n};\n```\n\nThe above config will make the tests fail if more than 150 pixels in total changed or more than 50% of the pixels changed.\nIt will detect any pixel as changed even if the color only differs minimally and antialiasing detection is disabled.\n\n## Usage\n\nTake a look at [the example project](example/).\n\nThis library can be used to compare images with snapshots:\n\n```typescript\ndescribe(\"My fancy image\", () => {\n    const myFancyImage = readFileSync(\"../my-fancy-image.png\");\n\n    it(\"looks as beautiful as always\", () => {\n        expect(myFancyImage).toMatchImageSnapshot();\n    });\n});\n```\n\nThis is for example useful for integration tests with [puppeteer](https://github.com/GoogleChrome/puppeteer):\n\n```typescript\ndescribe(\"My fancy webpage\", () => {\n    const page = ...; // Setup puppeteer.\n\n    it(\"looks as gorgeous as ever\", async () => {\n        expect(await page.screenshot()).toMatchImageSnapshot();\n    });\n});\n```\n\nIt is possible to specify a custom path to store the snapshot at:\n\n```typescript\ndescribe(\"My fancy image\", () => {\n    const myFancyImage = readFileSync(\"../my-fancy-image.png\");\n\n    it(\"looks as beautiful as always\", () => {\n        expect(myFancyImage).toMatchImageSnapshot({ path: \"../../my-fancy-image.snap.png\" });\n    });\n});\n```\n\nIt is possible to import ```toMatchImageSnapshot()``` for custom assertions.\nAs it requires configuration as second argument, ```config()``` function\n(_which is responsible for reading configuration from  jest-screenshot.json/package.json_) is also exposed.\n\n```typescript\nimport {config, toMatchImageSnapshot} from 'jest-screenshot';\n\nexpect.extend({\n  customMatcher(received, name) {\n    const image = customGetImage(received); // i.e. via puppeteer, html2canvas etc\n    const configuration = config(); // get existing config\n    if(process.env.LOOSE_SCREENSHOTS_MATCH) {\n        // loose mismatch threshold for specific environment setting\n        configuration.pixelThresholdRelative = configuration.pixelThresholdRelative + 0.1\n    }\n    return toMatchImageSnapshot.call(this, image, configuration, {\n        // build custom path for screenshot\n        path: `/custom_file_path/${configuration.snapshotsDir}/custom_file_prefix_${name}.png`\n    });\n  }\n});\n```\n\n## Benchmark\n\nThis library is around 10x faster than [jest-image-snapshot](https://github.com/americanexpress/jest-image-snapshot).\n\nIn the benchmark a whole unit test suite, including setup and teardown of the jest environment and 30 unit tests (10 matching,\n10 not matching and 10 newly created) were measured. Writing of the report is also included.\n\n![Benchmark](images/benchmark.png)\n\nThe X axis displays the amount of executed suites per second.\n\nIn average:\n\n * **jest-screenshot** took **~9 seconds** for 30 tests and\n * **jest-image-snapshot** took **>100 seconds**.\n\n## Reports\n\nAn HTML report with interactive tools for comparing the failed snapshots will be generated if any tests failed.\n\n**[A demo can be found here](https://prior99.github.io/jest-screenshot/report-demo).**\n\nThey might look for example like this:\n\n![Example Report](images/screenshot-report.png)\n\nThe report will be placed in a `jest-screenshot-report` directory in the project's root directory by default.\n\n## Contributing\n\nYarn is used instead of npm, so make sure it is installed. `npm install -g yarn`.\n\nGenerally, it should be enough to just run:\n\n```\nmake\n```\n\nwhich will install all node dependencies, compile typescript, execute all test,\nlint the sources and build the docs.\n\n## Contributors\n\n - Frederick Gnodtke\n","readmeFilename":"README.md"}