Adapter for Mocha testing framework for Bender.js
npm install benderjs-mochaAdapter for Mocha testing framework for Bender.js.
```
npm install benderjs-mocha
Add benderjs-mocha to the plugins array in your bender.js configuration file:
`javascript
var config = {
applications: {...}
browsers: [...],
plugins: ['benderjs-mocha'], // load the plugin
tests: {...}
};
module.exports = config;
`
Set mocha as a framework for the entire project or just a specific tests group:
`javascript
var config = {
applications: {...}
browsers: [...],
framework: 'mocha', // use for entire project
plugins: ['benderjs-mocha'],
tests: {
Foo: {
basePath: '',
framework: 'mocha' // use for a specific tests group
paths: [...]
}
}
};
module.exports = config;
`
You can set some of Mocha's options using bender.js configuration file.
`javascript
var config = {
applications: {...}
browsers: [...],
framework: 'mocha',
// configure Mocha
mocha: {
ui: 'tdd'
},
plugins: ['benderjs-mocha'],
tests: {...}
};
module.exports = config;
`
###Available options:
- String ui - Mocha's interface, possible values: bdd, tdd or exports. Default: bddtimeout
- Number - test case timeout in milliseconds. Default: 2000grep` - will only run tests matching the given pattern, this could break some of Bender's default behaviours ,so please use it at your own risk
- String|RegExp
MIT, for license details see: LICENSE.md.