Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cambiando var por let #142

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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