vuenit
Vue Unit Test Helpers
Vuenit is a testing utility that offers a number of useful methods to make testing Vue applications easier:
- Easily mount Vue components
- Test directives
- Search the DOM for component instances
- Inject dependencies into components
- Test slots
- Update data and props on the fly
- Shallow rendering
- Mocked versions of Vuex, Vue-Router, and a $http module to make testing with dependencies easier
npm install vuenit --save-dev
;; const $router = ;const $http = ;const $store = ; const options = inject : $router $http $store props : userId : 'x4' stubComponents : true; const vm = ;
Vuenit has a huge array of configuration options for different testing scenarios. For full documentation, see https://jackmellis.gitbooks.io/vuenit/content