You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.
# Node.js package installation
yarn
# Test run
yarn test
Execution result
yarn run v1.22.11
warning package.json: No license field
$ jest
FAIL test/sample.test.ts
image test
✓ test1.png ok (120 ms)
✕ test2.png ng (126 ms)
● image test › test2.png ng
Expected image to match or be a close match to snapshot but was 1.6022815659839251% different from snapshot (309 differing pixels).
See diff for details: jest-image-snapshot-sample/test/__image_snapshots__/__diff_output__/sample-test-ts-image-test-test-2-png-ng-1-diff.png
12 | const imagePath = path.join(process.cwd(), 'test/test2.png');
13 | const file = fs.readFileSync(imagePath);> 14 |expect(file).toMatchImageSnapshot();
| ^
15 | });
16 | });
17 |
at Object.<anonymous> (test/sample.test.ts:14:18)
› 1 snapshot failed.
Snapshot Summary
› 1 snapshot failed from 1 test suite. Inspect your code changes or run `yarn test -u` to update them.
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 passed, 2 total
Snapshots: 1 failed, 1 passed, 2 total
Time: 1.991 s
Ran all test suites.
error Command failed with exit code 1.