Created
December 17, 2009 15:12
-
-
Save oppara/258799 to your computer and use it in GitHub Desktop.
tap.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
// @see http://search.cpan.org/~mschwern/Test-Simple/lib/Test/More.pm | |
function test (num) { | |
if ( num > 0 ) { | |
console.log('1..' + num); | |
} | |
} | |
function is (got, expected, message) { | |
var str = ''; | |
if (got !== expected) { | |
str += 'not '; | |
} | |
str += 'OK'; | |
if (message) { | |
str += ' # ' + message; | |
} | |
console.log( str ); | |
if (got !== expected) { | |
console.log('# got: ' + got); | |
console.log('# expected: ' + expected); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment