View in #general on Slack
@dsantra: Hi. I am contributing to patternfly for the first time. Can someone please tell me how do I update stored snapshot ? I tried this ./node_modules/.bin/jest --updateSnapshot
from the patternfly-react path
@mturley: Hi @dsantra! Welcome to patternfly and thanks for contributing! You can update all the snapshots by running yarn test -u
from the repository’s root.
that will run all patternfly 3 and patternfly 4 tests including all packages in the monorepo… to run only the ones related to patternfly 4 you can run yarn test:pf4 -u
@mspaxman: You might also try ./node_modules/jest/bin/jest.js NameOfTest.test.tsx -u
- it will update just the single test you’re interested in
@zallen: alternative that’s easier to remember: yarn run jest MyTestPattern -u
yarn test:pf4
is what CI runs (which runs all patternfly-4 tests)