Skip to content

Example/Boiler-plate for a TDD-ed VueJS frontend to webapps Using vuejs's Single File Components, webpack, karma, jasmine

License

Notifications You must be signed in to change notification settings

rija/tdd-vuejs-frontend-webpack

Repository files navigation

Build Status

Example/Boiler-plate for a TDD-ed VueJS frontend to webapps

Using Vuejs's Single File Components, Webpack, Karma, Jasmine

Get started

prerequisites: NodeJS, Chrome, Firefox

$ npm install

Build the app

$ npm run build

Running the tests

On one terminal window/tab, start the Karma server:

$ npx cross-env BABEL_ENV=test karma start

Normally, the test suite will run whenever the code changes, but if one wants to trigger an explicit test run, this is the command to type:

$ npm test

If starting a server is not desirable (e.g: CI), this one-off command will run the tests in a standalone fashion:

$ npx cross-env BABEL_ENV=test karma start --single-run

Background

Inspired by the examples from VueJS docs and the boilerplate Github repo made by Edd Yerburgh to test VueJS app with Karma/Mocha/Chai: vue-test-utils-karma-example

Note: Whose book can be found here:Testing Vue.js Applications

I wanted to create a skeleton project that works in 2019 for the "Future me" whenever I need to spin off a VueJS project to test with Jasmine while learning how to use these tools together.

This is a follow up to my single web page CodePen example for testing a VueJS app using Jasmine: VueJS Unit testing with Jasmine

TODO

  • Fix coverage
  • Add Safari to the list of browsers

About

Example/Boiler-plate for a TDD-ed VueJS frontend to webapps Using vuejs's Single File Components, webpack, karma, jasmine

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy