Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rija/tdd-vuejs-frontend-webpack
Example/Boiler-plate for a TDD-ed VueJS frontend to webapps Using vuejs's Single File Components, webpack, karma, jasmine
https://github.com/rija/tdd-vuejs-frontend-webpack
boiler-plate jasmine javascript karma tdd vuejs-frontend webpack
Last synced: 9 days ago
JSON representation
Example/Boiler-plate for a TDD-ed VueJS frontend to webapps Using vuejs's Single File Components, webpack, karma, jasmine
- Host: GitHub
- URL: https://github.com/rija/tdd-vuejs-frontend-webpack
- Owner: rija
- License: mit
- Created: 2019-12-15T07:55:25.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T02:42:14.000Z (over 1 year ago)
- Last Synced: 2024-10-17T08:50:05.615Z (19 days ago)
- Topics: boiler-plate, jasmine, javascript, karma, tdd, vuejs-frontend, webpack
- Language: JavaScript
- Size: 754 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/rija/tdd-vuejs-frontend-webpack.svg?branch=master)](https://travis-ci.org/rija/tdd-vuejs-frontend-webpack)
# 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](https://github.com/eddyerburgh/vue-test-utils-karma-example)
_**Note**: Whose book can be found here:[Testing Vue.js Applications](https://www.manning.com/books/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](https://codepen.io/rija/pen/yLyJYEq)## TODO
* [ ] Fix coverage
* [ ] Add Safari to the list of browsers