Skip to content

Commit

Permalink
Merge pull request #134 from LaunchCodeEducation/mike-issue-33
Browse files Browse the repository at this point in the history
Fixed issues with rps being required/imported as test
  • Loading branch information
mlambert125 authored Sep 5, 2024
2 parents fbc38d4 + b9acceb commit a0f74a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/unit-testing/exercises/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ It then decides which player won the match and returns a string.
RPS.spec.js:

```js
const test = require('../RPS.js');
const rps = require('../RPS.js');
```

{{% /expand %}}
Expand All @@ -231,12 +231,12 @@ It then decides which player won the match and returns a string.

```js
test("returns 'Player 2 wins!' if P1 = rock & P2 = paper", function(){
let output = test.whoWon('rock','paper');
let output = rps.whoWon('rock','paper');
expect(output).toBe("Player 2 wins!");
});
test("returns 'Player 2 wins!' if P1 = paper & P2 = scissors", function(){
let output = test.whoWon('paper','scissors');
let output = rps.whoWon('paper','scissors');
expect(output).toBe("Player 2 wins!");
});
```
Expand Down

0 comments on commit a0f74a3

Please sign in to comment.