From b9acceb241fa85ccc08399fb761eb387b95bf1ce Mon Sep 17 00:00:00 2001 From: Michael Lambert Date: Wed, 4 Sep 2024 20:31:30 -0400 Subject: [PATCH] Fixed issues with rps being required/imported as test and conflicting with the test library --- content/unit-testing/exercises/_index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/unit-testing/exercises/_index.md b/content/unit-testing/exercises/_index.md index f2c8fca4..379f3aa9 100644 --- a/content/unit-testing/exercises/_index.md +++ b/content/unit-testing/exercises/_index.md @@ -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 %}} @@ -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!"); }); ```