Created
December 11, 2012 14:19
-
-
Save samgiles/4258897 to your computer and use it in GitHub Desktop.
Buster JS TestCase
This file contains hidden or 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
var config = module.exports; | |
config["The Tests"] = { | |
env: "browser", | |
rootPath: ".", | |
tests:[ | |
"*-test.js" | |
] | |
}; |
This file contains hidden or 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
buster.testCase("My thing", { | |
"has the foo and bar": function () { | |
var fibonacci = function(n) { | |
if (n == 0) { return 0; } | |
if (n == 1) { return 1; } | |
return fibonacci(n - 1) + fibonacci(n-2); | |
} | |
// WAT?! | |
assert(fibonacci(43) === 433494437); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment