Lamenda / vue-tests

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.


Languages

Language:JavaScript 90.8%Language:Vue 8.4%Language:HTML 0.8%