Skip to content

Instantly share code, notes, and snippets.

@sdepold
Created June 10, 2010 12:52
Show Gist options
  • Save sdepold/432944 to your computer and use it in GitHub Desktop.
Save sdepold/432944 to your computer and use it in GitHub Desktop.
// the basic structure
describe("the class you want to test", function() {
describe("a function you want to test", function() {
it("should do something", function() {
// your nice test code here
})
})
})
// some more practical
describe("Car", function() {
describe("constructor", function() {
it("should throw exception if no speed limit is passed", function() {
// call the constructor and don't pass a speed limit!
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment