0

I implemented unit and snapshot tests for my Vue.js project. Now I want to run unit and snapshot test separately (to integrate them into separate gitlab CI jobs).

By runing the following command both unit and snapshot tests execute: vue-cli-service test:unit

I used the following documentation to implement the snapshot tests: https://vue-test-utils.vuejs.org/guides/testing-single-file-components-with-jest.html#snapshot-testing

Simon Thiel
  • 2,888
  • 6
  • 24
  • 46
  • I use the default `vue init webpack` setup – Simon Thiel Apr 25 '19 at 12:52
  • I am was able to run only the snapshot test with the following jest cli option: `npm run test:unit -- --testNamePattern=.*snapshot$` see also: https://jestjs.io/docs/en/cli#testnamepattern-regex – Simon Thiel May 22 '19 at 06:44

0 Answers0