mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-25 02:14:11 -05:00
fix(curriculum): last test for step 1 RPS project to better check for final result (#54815)
This commit is contained in:
@@ -36,9 +36,13 @@ assert.include(["Rock", "Paper", "Scissors"], getRandomComputerResult());
|
||||
Your `getRandomComputerResult` function should return a random option each time.
|
||||
|
||||
```js
|
||||
assert.include(["Rock", "Paper", "Scissors"], getRandomComputerResult());
|
||||
assert.include(["Rock", "Paper", "Scissors"], getRandomComputerResult());
|
||||
assert.include(["Rock", "Paper", "Scissors"], getRandomComputerResult());
|
||||
const results = new Set();
|
||||
|
||||
for (let i = 0; i < 50; i++) {
|
||||
results.add(getRandomComputerResult());
|
||||
}
|
||||
|
||||
assert.hasAllKeys(results, ["Rock", "Paper", "Scissors"]);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user