Created
March 2, 2011 22:53
-
-
Save luebken/851937 to your computer and use it in GitHub Desktop.
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
require('should'); | |
exports.testSomething = function(test){ | |
test.ok(true, "this assertion should pass"); | |
test.done(); | |
}; | |
/* | |
exports.testSomethingElse = function(test){ | |
test.ok(false, "this assertion should fail"); | |
test.done(); | |
}; | |
*/ | |
exports.testSomethingWithShould = function(test){ | |
true.should.be.ok; | |
test.done(); | |
}; | |
/* | |
exports.testSomethingElseWithShould = function(test){ | |
false.should.be.ok;//fails | |
test.done(); | |
}; | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output:
nodeunit nodeunit-should.js
nodeunit-should.js
✔ testSomething
✔ testSomethingWithShould
OK: 1 assertions (12ms)
But should output 2 assertions!