Last active
August 29, 2015 13:57
-
-
Save salomvary/9405609 to your computer and use it in GitHub Desktop.
Finally found a reason to use Function.prototype.apply.bind
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
test(function() { | |
[ | |
['foo', 'bar', 'baz'], | |
['fuz', 'barz', 'bazz'], | |
['fux', 'bax', 'bazx'] | |
].forEach(Function.apply.bind(function(input1, input2, expectedOutput) { | |
assertEquals(subject(input1, input2), expectedOutput) | |
}, this)) | |
}) | |
// Yes, I know there are other (less cryptic) ways to achieve this :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment