Given-When-Then Blocks
Feature: Box Size
In order to know what size box I need
As a distribution manager
I want to know the volume of the box
Scenario: Get box volume
Given I have entered a width of 20
And a height of 30
And a depth of 40
When I run the calculation
Then the result should be 24000feature( "Box Size", function(){
describe( "In order to know what size box I need
As a distribution manager
I want to know the volume of the box", function(){
scenario( "Get box volume", function(){
given( "I have entered a width of 20
And a height of 30
And a depth of 40", function(){
when( "I run the calculation", function(){
then( "the result should be 24000", function(){
// call the method with the arguments and test the outcome
expect( myObject.myFunction(20,30,40) ).toBe( 24000 );
});
});
});
});
});
});Last updated
Was this helpful?