Skip to content

Commit

Permalink
Cambiando var por let
Browse files Browse the repository at this point in the history
  • Loading branch information
iyanfdezz committed Apr 25, 2024
1 parent cb53d74 commit 0889b33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions webapp/src/pages/Calculadora/Calculadora.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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]
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/pages/Config/Config.test.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down

0 comments on commit 0889b33

Please sign in to comment.