paratest
parameterize your javascript tests
what if you never had to write a describe block again? what would you do with all the extra time saved?
usage
require paratest
in your spec file and give it an array of tests to run
const paratest = ;const compute = ; const tests = subject: computesum cases: name: "works" args: 1 2 result: 3 name: "works with floats" args: 10 2 result: 30 subject: computemult cases: name: "works" args: 1 2 result: 2 name: "works with floats" args: 10 2 result: 20 ; ;
compatibility
jasmine and jest work out of the box. to use mocha w/ chai, simply pass in a function as the third argument to paratest that does the assertion of your choice.
const expect = expect; ... ;