2.0.3 • Published 10 years ago

rock-solid v2.0.3

Weekly downloads
1
License
MIT
Repository
-
Last release
10 years ago

##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:

using([{
    input: 'monkey',
    expectedResult: 'I R Baboon'
}], function(animal, expectedSound){
    describe(`when the animal is a ${input} and makeSound() is called`, function() {
        it(`it should make the sound ${expectedResult}`, 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

2.0.3

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.0

10 years ago