Skip to content

Instantly share code, notes, and snippets.

@luebken
Created March 2, 2011 22:53
Show Gist options
  • Save luebken/851937 to your computer and use it in GitHub Desktop.
Save luebken/851937 to your computer and use it in GitHub Desktop.
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();
};
*/
@luebken
Copy link
Author

luebken commented Mar 2, 2011

Output:
nodeunit nodeunit-should.js
nodeunit-should.js
✔ testSomething
✔ testSomethingWithShould
OK: 1 assertions (12ms)

But should output 2 assertions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment