From fe1e27fd40ebf11c9f1a6da8d1360dd9bbc50845 Mon Sep 17 00:00:00 2001 From: jdalton Date: Sun, 5 Apr 2015 13:45:56 -0500 Subject: [PATCH] Add tests for `_.add` coercing params to numbers. --- test/test.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/test.js b/test/test.js index 46eaca900..e89b6371d 100644 --- a/test/test.js +++ b/test/test.js @@ -979,7 +979,13 @@ (function() { test('should add two numbers together', 1, function() { - equal(_.add(6, 4), 10); + strictEqual(_.add(6, 4), 10); + }); + + test('should coerce params to numbers', 3, function() { + strictEqual(_.add('6', '4'), 10); + strictEqual(_.add('6', 'y'), 6); + strictEqual(_.add('x', 'y'), 0); }); test('should return an unwrapped value when implicitly chaining', 1, function() {