From 11a3e0bd3b92f03f801469f7a7486fe6d7615417 Mon Sep 17 00:00:00 2001 From: lucia-sonia Date: Thu, 25 Apr 2024 21:02:55 +0200 Subject: [PATCH] ahora el test del sameCategory deberia funcionar --- .../src/components/game/gameModes/SameCategoryMode.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/src/components/game/gameModes/SameCategoryMode.test.js b/webapp/src/components/game/gameModes/SameCategoryMode.test.js index 20a20417..e5626f3a 100644 --- a/webapp/src/components/game/gameModes/SameCategoryMode.test.js +++ b/webapp/src/components/game/gameModes/SameCategoryMode.test.js @@ -1,4 +1,4 @@ -const SameCategoryMode = require('./SameCategoryMode'); +import SameCategoryMode from './SameCategoryMode'; describe('SameCategoryMode', () => { @@ -33,7 +33,7 @@ describe('SameCategoryMode', () => { }); test('fetchQuestions should handle errors', async () => { - const sameCategoryMode = new SameCategoryMode(); + const sameCategoryMode = new SameCategoryMode("arte"); sameCategoryMode.apiEndpoint = 'https://example.com'; sameCategoryMode.questions = []; sameCategoryMode.isLoading = true; @@ -47,7 +47,7 @@ describe('SameCategoryMode', () => { }); test('sendHistory should not save game history', async () => { - const sameCategoryMode = new SameCategoryMode(); + const sameCategoryMode = new SameCategoryMode("arte"); sameCategoryMode.sendHistory(); });