Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pablocattaneo/bf71e7f2ad7706d83389a21cd55312f0 to your computer and use it in GitHub Desktop.
Save pablocattaneo/bf71e7f2ad7706d83389a21cd55312f0 to your computer and use it in GitHub Desktop.
1 - sudo vue add @vue/unit-jest
2 - Clear Jest cache. You can find the cache location by running `jest --showConfig`. Look for `cacheDirectory` key. Its value is the name of the folder you'll need to remove.
3 - Create test files into project_name/tests/unit/. file must have this structure name.spec.js for example /home/pablo/projects/lumbre/lumbre-vue-admin/tests/unit/LmPagination.spec.js
4 - In the terminal yarn test:unit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment