Skip to content

Commit f6743c4

Browse files
author
Luke Bowerman
authored
Fix image-snapshots (#1565)
Actual bug was in `MessageBar.story.tsx` Added infrastructure to _hopefully_ notify of this kind of failure again (should warn when snapshots exist that are no longer in use) Update a variety of out-of-date snapshots
1 parent 5598169 commit f6743c4

17 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- `Space` revert mistakenly applied `flex-shrink: 0`
1212
- `useDialog` needs to support scenario it is controlled but `onClose` isn't specified
1313
- Reverts: `HoverDisclosure` toggles visibility with css rather than inserting elements into the DOM
14+
- Fix `image-snapshots` issue
1415

1516
## [0.9.17] - 2020-10-12
1617

jest-image-snapshots.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ module.exports = {
3535
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)$':
3636
'<rootDir>/config/jest/fileMock.js',
3737
},
38+
reporters: [
39+
'default',
40+
'jest-image-snapshot/src/outdated-snapshot-reporter.js',
41+
],
3842
roots: ['<rootDir>'],
3943
testEnvironment: 'jsdom',
4044
testMatch: ['**/*.shots.ts'],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"storybook": "yarn workspace storybook start",
4646
"storybooks-build": "yarn lerna run storybook-build --scope '@looker/*' --stream --parallel",
4747
"preimage-snapshots": "yarn storybooks-build",
48-
"image-snapshots-only": "yarn jest --config jest-image-snapshots.config.js",
48+
"image-snapshots-only": "export JEST_IMAGE_SNAPSHOT_TRACK_OBSOLETE=1 && yarn jest --config jest-image-snapshots.config.js",
4949
"image-snapshots": "yarn image-snapshots-only"
5050
},
5151
"devDependencies": {
0 Bytes
Loading
2 Bytes
Loading
2 Bytes
Loading
1 Byte
Loading
0 Bytes
Loading
0 Bytes
Loading
-2.7 KB
Loading

0 commit comments

Comments
 (0)