Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/florian/js-testing-boilerplates
Just some boilerplates for common JS testing setups.
https://github.com/florian/js-testing-boilerplates
Last synced: 5 days ago
JSON representation
Just some boilerplates for common JS testing setups.
- Host: GitHub
- URL: https://github.com/florian/js-testing-boilerplates
- Owner: florian
- Created: 2013-01-18T21:19:24.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-02-22T19:09:22.000Z (over 11 years ago)
- Last Synced: 2024-08-01T19:57:03.715Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 136 KB
- Stars: 122
- Watchers: 10
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JavaScript testing boilerplate
JavaScript testing frameworks require a lot of boilerplate. I grew tired of of having to set up all the files for every project, thus I decided to maintain this repo to quickly `cp` them into my project.
The different testing frameworks need different files, so I made a folder for each combination I used so far.
## Usage
```sh
$ git clone https://github.com/js-coder/js-testing-boilerplates.git
$ cd yourProject # A git repo
$ cp -r ../js-testing-boilerplates/mocha-chai/* .
$ make init-testing
```## Submodules / NPM
All vendor files are added with git submodules or NPM, so you can easily update them.
## Makefile
Each boilerplate folder contains a Makefile with these tasks:
- `make init-testing`: Initialise the git submodules. Run this after `cp`ing the boilerplate.
- `make update-testing`: Updates the node packages and / or the git submodules.
- `make test`: Run the test suite, with the framework's command line tool or grunt + PhantomJS.The folders also contain [grunt](https://github.com/gruntjs/grunt) files, so you can easily re-run the tests when files change.
```sh
$ grunt watch
````mocha-node-should` doesn't contain grunt, but a `make test-w` task.
## Travis
Configuration for the [travis](https://travis-ci.org/) continuous integration service is on board too!