Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jackmellis/vuenit
Vue Unit Test Helpers for server-side testing of client-side code
https://github.com/jackmellis/vuenit
Last synced: about 1 month ago
JSON representation
Vue Unit Test Helpers for server-side testing of client-side code
- Host: GitHub
- URL: https://github.com/jackmellis/vuenit
- Owner: jackmellis
- Created: 2017-01-19T10:27:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-16T08:06:13.000Z (about 5 years ago)
- Last Synced: 2024-01-12T20:06:03.218Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 347 KB
- Stars: 36
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
Lists
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Components & Libraries / Dev Tools)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Components & Libraries / Dev Tools)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Components & Libraries / Dev Tools)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Components & Libraries / Dev Tools)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Components & Libraries / Dev Tools)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Components & Libraries / Dev Tools)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Components & Libraries / Dev Tools)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Components & Libraries / Dev Tools)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Components & Libraries / Dev Tools)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Dev Tools / Test)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Dev Tools / Test)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Dev Tools / Test)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Dev Tools / Test)
- awesome-vue. - vuenit - Utilities for testing Vue components and directives. (Dev Tools / Test)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Dev Tools / Test)
- awesome-vue - vuenit ★37 - Utilities for testing Vue components and directives. (Dev Tools / Test)
- awesome-vue - vuenit - Utilities for testing Vue components and directives. (Components & Libraries / Dev Tools)
- awesome-vuejs - vuenit - Utilities for testing Vue components and directives. (Dev Tools / Test)
README
# vuenit
Vue Unit Test Helpers[![npm version](https://badge.fury.io/js/vuenit.svg)](https://badge.fury.io/js/vuenit)
[![Build Status](https://travis-ci.org/jackmellis/vuenit.svg?branch=master)](https://travis-ci.org/jackmellis/vuenit)
[![Code Climate](https://codeclimate.com/github/jackmellis/vuenit/badges/gpa.svg)](https://codeclimate.com/github/jackmellis/vuenit)
[![Test Coverage](https://codeclimate.com/github/jackmellis/vuenit/badges/coverage.svg)](https://codeclimate.com/github/jackmellis/vuenit/coverage)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
``````js
import {mount, mockRouter, mockHttp, mockStore} from 'vuenit';
import c from 'path/to/component';const {$router} = mockRouter();
const $http = mockHttp();
const $store = mockStore();const options = {
inject : { $router, $http, $store },
props : { userId : 'x4' },
stubComponents : true
};const vm = mount(c, options);
```__Vuenit__ has a huge array of configuration options for different testing scenarios. For full documentation, see [https://jackmellis.gitbooks.io/vuenit/content](https://jackmellis.gitbooks.io/vuenit/content)