Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Bystander plugin for Mocha
CoffeeScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
src
test
.gitignore
Makefile
README.md
package.json

README.md

By-Mocha

A Bystander plugin to auto-run Mocha tests after file change events.
Note it only works with CoffeeScript for now, and has to be used in conjunction with by-coffeescript and by-write2js plugins.

Installation

To install by-mocha,

sudo npm install -g by-mocha

Options

testPaths : comma separated paths for test sources

Examples

Auto-run tests in test directory with Mocha.

// .bystander config file
.....
.....
  "plugins" : ["by-coffeescript", "by-write2js", "by-mocha"],
  "by" : {
    "mocha" : {
      "testPaths" : ["test/*.coffee"]
    }
  },
.....
.....

testPaths will be resolved against the project root path.

Broadcasted Events for further hacks

mocha : successfully ran tests with mocha.
set dependency : set test dependencies for a new file.
remove dependency : removed test dependencies for a deleted file.

See the annotated source for details.

Running Tests

Run tests with mocha

make

License

By-Mocha is released under the MIT License. - see the LICENSE file

Something went wrong with that request. Please try again.