Last active
September 28, 2015 11:41
-
-
Save tarzak/c4d74d3ad614225c175b to your computer and use it in GitHub Desktop.
example of unit testing from inside?
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
//function to test | |
function aPlusB (a,b) { | |
return a+b | |
}; | |
//test-function | |
function testAplusB (func) { | |
return func(2,1) === 3 | |
}; | |
//invoking of test-function | |
testAplusB(aPlusB) // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment