cura-test-runner
A simple mocha test executor. Just add as dev-dependency and write a test.js with require('cura-test-runner') to run all coffee/mocha tests and get notified via growl of failures"
Last updated 6 years ago by matthiasg .
BSD · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cura-test-runner 
SYNC missed versions from official npm registry.

cura-test-runner

Simple test-runner to include as dev-dependency. Write a test.js and require this module to automatically run coffee tests with mocha.

Install

npm install cura-test-runner --save-dev

Create test.js file

test.js

require('cura-test-runner/run');

Running

Executing the test in (test/*.coffee) just requires running

node test.js 

or when test.js is configured as a test as seen below

npm test

Options

Sometimes it might make sense to override the defaults for the tests. In that case simply require the module and run the function manually with options.

test.js

var runner = require('cura-test-runner');
runner({ files: 'my-test-folder/*.test.js', coffee:false })

The default options are contained at the top of index.js for review.

package.json Scripts

Add this into package.json for convenience:

"scripts": {
  "test": "node test.js",
  "dev": "nodemon -e coffee,js test.js"
},

Note: I mapped npm run-script to rs so we can write rs dev and have continuous testing of our code on save.

For that to work you must have nodemon installed globally with:

npm install -g nodemon

Current Tags

  • 1.0.2                                ...           latest (6 years ago)

11 Versions

  • 1.0.2                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.0.9                                ...           6 years ago
  • 0.0.8                                ...           6 years ago
  • 0.0.7                                ...           6 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           7 years ago
  • 0.0.2                                ...           7 years ago
  • 0.0.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 0
Last Month 0
Dependencies (10)
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2016 © taobao.org |