From 98d2322da9f16f69b300cb3e6bbb5c19a28dc935 Mon Sep 17 00:00:00 2001 From: Blauelf Date: Sat, 28 Nov 2015 14:37:25 +0100 Subject: [PATCH] Added a test case to Where do I belong with return value 0 On the chat today I have seen several solutions that cannot return 0 (usually return arr.length instead), and they still pass, as there is no such test case. Here is one, `where([3, 10, 5], 3) === 0`. --- seed/challenges/basic-bonfires.json | 1 + 1 file changed, 1 insertion(+) diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index c8d292e215..addc714efa 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -740,6 +740,7 @@ "assert(where([10, 20, 30, 40, 50], 35) === 3, 'message: where([10, 20, 30, 40, 50], 35) should return 3.');", "assert(where([10, 20, 30, 40, 50], 30) === 2, 'message: where([10, 20, 30, 40, 50], 30) should return 2.');", "assert(where([40, 60], 50) === 1, 'message: where([40, 60,], 50) should return 1.');", + "assert(where([3, 10, 5], 3) === 0, 'message: where([3, 10, 5], 3) should return 0.');", "assert(where([5, 3, 20, 3], 5) === 2, 'message: where([5, 3, 20, 3], 5) should return 2.');", "assert(where([2, 20, 10], 19) === 2, 'message: where([2, 20, 10], 19) should return 2.');", "assert(where([2, 5, 10], 15) === 3, 'message: where([2, 5, 10], 15) should return 3.');"