Created
April 15, 2011 09:04
-
-
Save liammclennan/921432 to your computer and use it in GitHub Desktop.
what I think a JavaScript BDD syntax should look like
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
story("do a thing", function() { | |
scenario("when I do something under certain conditions", function() { | |
given("certain conditions", function() { | |
console.log("certain conditions"); | |
}); | |
when("I do something", function() { | |
console.log("I do something"); | |
}); | |
then("pigs should fly", function() { | |
console.log("pigs should fly"); | |
}); | |
and("some other observation", someOtherObservation); | |
function someOtherObservation() { | |
console.log("some other observation"); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment