From 57649a67265bcd177db2bbe4b9674b098d6f8c18 Mon Sep 17 00:00:00 2001 From: Daniel Franz Date: Sun, 29 Jul 2012 12:08:08 +0300 Subject: [PATCH] fix fizzbuzz in line 21 or 25 --- tests/app/flowControl.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/app/flowControl.js b/tests/app/flowControl.js index f61c83a5c..ba353dba8 100644 --- a/tests/app/flowControl.js +++ b/tests/app/flowControl.js @@ -6,7 +6,11 @@ define([ ], function(answers) { describe("flow control", function() { it("you should be able to conditionally branch your code", function() { - var num = Math.floor(Math.random() * 10) + 1; + var num = 0; + + while (num % 3 === 0 || num % 5 === 0) { + num = Math.floor(Math.random() * 10) + 1; + } expect(answers.fizzBuzz()).not.to.be.ok(); expect(answers.fizzBuzz(2)).to.be(2);