0.9.0 • Published 9 years ago

mocha-vary v0.9.0

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

This module allows to parametrize Mocha tests through injection of all required parameters into top-level describes.

Example

a.js:

var describe = require('mocha-vary').describe

describe('This will be parametrized', function(param1, param2) {
  // some tests, inner describes, etc.
})

b.js:

var describe = require('mocha-vary').describe

describe('This will be parametrized too', function(param1, param2) {
  // some tests
})

run.js:

var vary = require('mocha-vary')

vary.run({
  'first run' : { params: ['a', 'b'] },
  'second run': { params: ['c', 'd'] }
})

API

The proper documentation is pending, for now you can inspect the test suite and the examples.

License

MIT