mocha-vary
v0.9.0
Published
Easy parametrization for Mocha tests
Downloads
10
Maintainers
Readme
This module allows to parametrize Mocha tests through injection
of all required parameters into top-level describe
s.
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