Created
April 21, 2010 03:24
-
-
Save jed/373381 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
var | |
assert = require( "assert" ), | |
test = require( "fab/tests" ); | |
function myBinaryApp( app ) { | |
return function() { | |
require( "sys" ).puts( "myBinaryApp called..." ) | |
return app.call( this ); | |
} | |
} | |
exports.tests = [ | |
function(){ tests.assertArity( 2 )( myBinaryApp ) }, | |
function(){ | |
var unaryApp = myBinaryApp( function(){} ); | |
tests.assertArity( 1 )( unaryApp ); | |
} | |
] | |
exports.docs = "\ | |
This is my documentation.\ | |
I hope this idea isn't too janky.\ | |
"; | |
exports.app = myBinaryApp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment