duetds / date-picker

Duet Date Picker is an open source version of Duet Design System’s accessible date picker. Try live example at https://duetds.github.io/date-picker/
https://www.duetds.com
MIT License
1.73k stars 68 forks source link

Build attempt fails due to snapshot mismatch #18

Closed Woebin closed 4 years ago

Woebin commented 4 years ago

Describe the bug Running npm install fails when automated testing detects unacceptable differences in the image snapshot diffs.

To Reproduce

  1. Clone the project
  2. Run npm install
  3. Wait while install process runs
  4. See error

Expected behavior I expected the installation not to fail, and to complete successfully.

Screenshots Console output: image

Images found in \date-picker\src\components\duet-date-picker\__image_snapshots__\__diff_output__: duet-date-picker-e-2-e-ts-duet-date-picker-min-max-support-supports-a-max-date-1-diff duet-date-picker-e-2-e-ts-duet-date-picker-min-max-support-supports-a-min-date-1-diff duet-date-picker-e-2-e-ts-duet-date-picker-min-max-support-supports-min-and-max-dates-1-diff

Desktop (please complete the following information):

arielsalminen commented 4 years ago

@Woebin Thanks for reporting! We’re aware of this, but need to ponder a little what to do here. @WickyNilliams good ideas?

WickyNilliams commented 4 years ago

I think we should not be running tests on install. I think the prepublish hook in package.json runs on install (surprising quirk of npm!). We should change to prepublishOnly, which doesn't have this surprising behaviour

arielsalminen commented 4 years ago

Fixed in my latest commit.