Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Vue Unit Test Helpers for server-side testing of client-side code

NotificationsYou must be signed in to change notification settings

jackmellis/vuenit

Repository files navigation

Vue Unit Test Helpers

npm versionBuild StatusCode ClimateTest 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
  • Updatedata andprops on the fly
  • Shallow rendering
  • Mocked versions ofVuex,Vue-Router, and a$http module to make testing with dependencies easier
npm install vuenit --save-dev
import{mount,mockRouter,mockHttp,mockStore}from'vuenit';importcfrom'path/to/component';const{$router}=mockRouter();const$http=mockHttp();const$store=mockStore();constoptions={inject :{ $router, $http, $store},props :{userId :'x4'},stubComponents :true};constvm=mount(c,options);

Vuenit has a huge array of configuration options for different testing scenarios. For full documentation, seehttps://jackmellis.gitbooks.io/vuenit/content

About

Vue Unit Test Helpers for server-side testing of client-side code

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp