0.0.2 • Published 8 years ago

bubbleup-plugin-test-mocha v0.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Bubble Mocha Test Plugin

0 configuration mocha testing with bubbleup

Usage

npm install --save-dev bubble-plugin-test-mocha
bubbleup test # defaults to test/ folder
# or 
bubbleup test src/*.test.js

Plugin API

This Bubbleup plugin exposes a plugin API to further extend how you are testing with mocha.

A bubble mocha plugin looks like this

module.exports = {
  exec: function (mocha, register) {
    // mocha is a mocha instance
    // register is a way to add global requires like require('babel-register')
  }
}

This plugin automatically looks up packages named with the prefix bubbleup-plugin-test-mocha. Though it doesn't exist yet, a plugin for babel-register would look like this

// theorectical bubbleup-plugin-test-mocha-babel-register
module.exports = {
  exec: function (mocha, register) {
    register('babel-register')
  }
}

that's it!