Rock Solid is a library that adds data driven testing capabilities to BDD style testing frameworks like Jasmine, Mocha etc
npm install rock-solid##What:
Rock solid is a library that adds data driven testing capabilities to BDD style testing frameworks like Jasmine, Mocha etc
##Install:npm install rock-solid
##Usage:
import the keyword you need
#using:
Used to execute a it or describe block repetitively with different input data and expected results for each data set
1. import {using} from 'rock-solid'
2. Wrap either a describe or it block in a using block:
``javascript when the animal is a ${input} and makeSound() is called
using([{
input: 'monkey',
expectedResult: 'I R Baboon'
}], function(animal, expectedSound){
describe(, function() {it should make the sound ${expectedResult}
it(, function() {``
let actualSound = makeSound();
expect(actualSound).toEqual(expectedSound);
});
});
});
##Credits:
1. JP Castro from Lyon, France: The guy that got me started on this with this blog