Repeatedly run mocha test with varied parameters


Repeatedly run a mocha test with varying parameters.

var testAll = require('test-repeater'), thingsToTest = [{ description: 'should return bar with argument foo' argument: 'foo' returnValue: 'bar' }];

testAll(thingsToTest).with(function(testDepiction) { baz(testDepiction.argument).should.eql(testDepiction.returnValue); });

  • test depictions must have a description parameter
  • test functions must have testDepicition as their first parameter
  • test functions with two parameters will have mocha's done put into the second parameter
  • only the mocha bdd interface is supported
  • Support something other than bdd interface