Skip to content

Testing

David Graham edited this page Jul 7, 2018 · 6 revisions

In this section of the tutorial we'll look at Unit and End-to-End testing...

Setup Jest

Install Jest

npm install jest babel-jest vue-jest --save-dev

Add Jest to eslintrc.js

So that eslint will not complain about Jest we need to add it to the environment property:

.eslintrc.js

// ...

env: {
  browser: true,
  jest: true
},

Setup Jest in package.json to compile Vue SFCs (single file components)

Clone this wiki locally