I should be able to add -u
parameter when running my tests, but I can't figure out why it doesn't work:
npm run test ComponentName.spec.js -u
npm run test ComponentName.spec.js --updateSnapshot
but it doesn't work. My package.json:
"scripts": {
"test": "vue-cli-service test:unit",
I know I can just delete the snapshot files, but I'd like to figure out why the command doesn't work.
based on the doc: https://jestjs.io/docs/en/cli#using-with-npm-scripts
npm run test -- -u
I verified this works.