Skip to content

Commit

Permalink
Add corner case assertion to curry test
Browse files Browse the repository at this point in the history
Add more corner case to avoid confusion that this curry should not only work with addition.
  • Loading branch information
asendia committed Jun 17, 2015
1 parent 03d576d commit 838a73f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions curry/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ describe('curry', function() {
assert.equal(add(1)(2)(3), 6);
assert.equal(add(2)(3)(4), 9);
});

it("doesn't only work with addition", function() {
var merge = curry(function(a, b, c) {
return [a, b, c].join(', ');
});
assert.equal(merge('1')(2)(3), '1, 2, 3');
});


});

0 comments on commit 838a73f

Please sign in to comment.