Skip to content

Commit

Permalink
Update robot-name.spec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
masters3d authored Apr 6, 2017
1 parent 9b8efa0 commit 75c6f43
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions exercises/robot-name/robot-name.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
});

});

Expand Down

0 comments on commit 75c6f43

Please sign in to comment.