From dd5feb4a2c00bc4b4249722ed696e7b8ecc6601b Mon Sep 17 00:00:00 2001 From: Dmytro Yarmak Date: Wed, 2 Sep 2015 23:17:33 +0300 Subject: [PATCH] Improve test cases for Generate Random Whole Numbers within a Range --- seed/challenges/basic-javascript.json | 1 + 1 file changed, 1 insertion(+) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index a4c3cabdb9..a26a417c87 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -936,6 +936,7 @@ "tests":[ "assert(myFunction() >= min, 'The random number that\\'s generated by myFunction should be greater than or equal to the minimum number');", "assert(myFunction() <= max, 'The random number that\\'s generated by myFunction should be less than or equal to the maximum number');", + "assert(myFunction() % 1 === 0 , 'The random number that\\'s generated by myFunction should be an integer');", "assert((function(){if(editor.getValue().match(/max/g).length >= 2 && editor.getValue().match(/min/g).length >= 2 && editor.getValue().match(/Math.floor/g) && editor.getValue().match(/Math.random/g)){return true;}else{return false;}})(), 'You should be using the function given in the description to calculate the random in number in a range');" ], "challengeSeed":[