Skip to content

A simple unit test for a list component in Vue JS.

Notifications You must be signed in to change notification settings

lilyrae/vue-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue JS Unit Tests

This project contains a unit test for a simple to do list component. The project was set up using vue-cli and the tests are made with Mocha framework and run using Karma.

When the app is running, you can navigate to localhost:8080/#/to-do to find the page for the to do list.

I explain how the test works in my blog post: https://scotch.io/tutorials/how-to-write-a-unit-test-for-vuejs

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

About

A simple unit test for a list component in Vue JS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published