From c305f1f5cda0dbe4536dc6d6065cdef4f77d66d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20P=C3=A5hlsson?= Date: Tue, 5 May 2015 11:49:18 +0200 Subject: [PATCH] Fix typo and add tests for Arguments Optional Add tests for the second argument and fix a typo. --- seed_data/bonfires.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index 24d2813064..c5e6d75798 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -628,13 +628,15 @@ "description": [ "Create a function that sums two arguments together. If only one argument is provided, return a function that expects one additional argument and will return the sum.", "For example, add(2, 3) should return 5, and add(2) should return a function that is waiting for an argument so that var sum2And = add(2); return sum2And(3); // 5", - "If either argument isn't a valid numbers, return undefined" + "If either argument isn't a valid number, return undefined." ], "challengeSeed": "function add() {\n return false;\n}\n\nadd(2,3);", "tests": [ "expect(add(2, 3)).to.equal(5);", "expect(add(2)(3)).to.equal(5);", - "expect(add('http://bit.ly/IqT6zt')).to.be.undefined;" + "expect(add('http://bit.ly/IqT6zt')).to.be.undefined;", + "expect(add(2, '3')).to.be.undefined;", + "expect(add(2)([3])).to.be.undefined;" ], "MDNlinks": ["Global Function Object", "Arguments object"] },