From 75c6f43139ac11a3bb314bce0f87297d3a6a5b07 Mon Sep 17 00:00:00 2001 From: "J. Cheyo Jimenez" Date: Wed, 5 Apr 2017 17:35:44 -0700 Subject: [PATCH] Update robot-name.spec.js https://github.com/exercism/x-common/issues/731 --- exercises/robot-name/robot-name.spec.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/exercises/robot-name/robot-name.spec.js b/exercises/robot-name/robot-name.spec.js index 24a0096fb3..7f33203d21 100644 --- a/exercises/robot-name/robot-name.spec.js +++ b/exercises/robot-name/robot-name.spec.js @@ -20,18 +20,6 @@ describe('Robot', () => { expect(differentRobot.name).not.toEqual(robot.name); }); - xit('there can be lots of robots with different names each', () => { - const NUMBER_OF_ROBOTS = 10000; - const usedNames = new Set(); - - for (let i = 0; i < NUMBER_OF_ROBOTS; i++) { - const newRobot = new Robot(); - usedNames.add(newRobot.name); - } - - expect(usedNames.size).toEqual(NUMBER_OF_ROBOTS); - }); - xit('is able to reset the name', () => { const originalName = robot.name; @@ -80,6 +68,19 @@ describe('Robot', () => { expect(areSequential(name2, name3)).toBe(false); expect(areSequential(name3, name3)).toBe(true); }); + + //This test is optional. + xit('there can be lots of robots with different names each', () => { + const NUMBER_OF_ROBOTS = 10000; + const usedNames = new Set(); + + for (let i = 0; i < NUMBER_OF_ROBOTS; i++) { + const newRobot = new Robot(); + usedNames.add(newRobot.name); + } + + expect(usedNames.size).toEqual(NUMBER_OF_ROBOTS); + }); });