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.
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 see my project's package.json
Screenshot in the readme:

Screenshot from my terminal:

(notice Snapshots: 0 total)
Okay, so this was a result of using multiSnapshotWithOptions. Unfortunately, as this brilliant article explains, it is a smart "monkey patch" - to state a custom snapshot filename. However, it has a few caveats; including the inability to update snapshots.
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 jest-specific-snapshot repo) and even though there was no a u command, I was able to press u and to update the snapshots. Here, in storybook it's not available (can't understand why, maybe because of the different Jest versions).
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: https://github.com/igor-dv/jest-specific-snapshot/pull/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
Most helpful comment
@igor-dv I did some digging and worked on solving the issue there: https://github.com/igor-dv/jest-specific-snapshot/pull/9. Please let me know what you think of it :)