diff --git a/webapp/src/pages/Calculadora/Calculadora.test.js b/webapp/src/pages/Calculadora/Calculadora.test.js index 89f551e4..4b3053a4 100644 --- a/webapp/src/pages/Calculadora/Calculadora.test.js +++ b/webapp/src/pages/Calculadora/Calculadora.test.js @@ -40,7 +40,7 @@ test("handles correct answer", async () => { ); // Get the initial operation - var initialOperation = screen.getByText( + let initialOperation = screen.getByText( /(\d+)\s*([-+*/])\s*(\d+)/ ).textContent; initialOperation = initialOperation.split("=")[0]; @@ -54,7 +54,7 @@ test("handles correct answer", async () => { fireEvent.click(submitButton); // Check if the score has increased - var updatedScore = parseInt( + let updatedScore = parseInt( screen .getByText(/puntuaciĆ³n: (\d+)/i) .textContent.split(":")[1] @@ -63,7 +63,7 @@ test("handles correct answer", async () => { expect(updatedScore).toBe(initialScore + 1); // Get next operation - var nextOperation = screen.getByText(/(\d+)\s*([-+*/])\s*(\d+)/).textContent; + let nextOperation = screen.getByText(/(\d+)\s*([-+*/])\s*(\d+)/).textContent; nextOperation = nextOperation.split("=")[0]; // Enter the correct answer and submit diff --git a/webapp/src/pages/Config/Config.test.js b/webapp/src/pages/Config/Config.test.js index fc4482b7..d7d29d70 100644 --- a/webapp/src/pages/Config/Config.test.js +++ b/webapp/src/pages/Config/Config.test.js @@ -1,5 +1,5 @@ import React from "react"; -import { render, screen, fireEvent } from "@testing-library/react"; +import { render, screen } from "@testing-library/react"; import "@testing-library/jest-dom/extend-expect"; import Config from "./Config"; import { BrowserRouter as Router } from "react-router-dom";