-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jest not recognising/updating Storyshots #3483
Comments
Okay, so this was a result of using |
Hey @Braden1996, multi-snapshots should work with manual updating. I wasn't aware of the watch mode that automatically updates snapshot, so I should probably check it. |
Small update here, I've tried multisnapshots outside the storybook (in the Anyway, I will try to check if it's possible to add a custom command to the watch. |
@igor-dv I did some digging and worked on solving the issue there: igor-dv/jest-specific-snapshot#9. Please let me know what you think of it :) |
I've published the change as v1.0.0. |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
It was released |
以下のように、Snapshots ファイルを分割すると、`-u` でアップデートできなくなるため修正。 また、jest-styled-components も上手く機能しない。 storybookjs/storybook#887 以下の issue が参考になりそう。一旦保留とする。 storybookjs/storybook#3483
コンポーネントのストーリごとにファイルを __snapshots__ フォルダを作成するように修正 storybookjs/storybook#3483 storybookjs/storybook#887
Bug or support request summary
Hello everyone,
I am trying to setup Storyshots on a project I am working on.
The initial snapshot generation is successful, however, all following changes are not picked up by jest's watch mode. If I want to update the snapshots, I have to use
npm run test -- -u
- which isn't ideal, as the tests never visibly fail.From the screenshot in the readme, this shouldn't happen - so I am not sure as to what I am doing wrong.
Steps to reproduce
I am not sure what, in particular, is causing this to happen. My setup uses Microsoft/TypeScript-React-Starter, perhaps that's related. Explicitly writing a snapshot test seems to work as expected, so the issue appears to be solely related to storyshots. I have created a test repository which can be used to reproduce the issue. You can find it here: https://github.com/Braden1996/ts-react-boilerplate
Please specify which version of Storybook and optionally any affected addons that you're running
Affected platforms
Please see my project's package.json
Screenshots / Screencast / Code Snippets (Optional)
Screenshot in the readme:
Screenshot from my terminal:
(notice
Snapshots: 0 total
)The text was updated successfully, but these errors were encountered: