From 0819279b98e76f00f9e7138b9861f249e767d575 Mon Sep 17 00:00:00 2001 From: uo289039 Date: Thu, 14 Mar 2024 17:39:02 +0100 Subject: [PATCH] Intento arreglo de tests 12, encontrando todos los errores --- webapp/src/components/Login.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/src/components/Login.test.js b/webapp/src/components/Login.test.js index 03def206..571507c3 100644 --- a/webapp/src/components/Login.test.js +++ b/webapp/src/components/Login.test.js @@ -36,7 +36,7 @@ describe('Login component', () => { //expect(screen.getByText(/Hello testUser!/i)).toBeInTheDocument(); //expect(screen.getByText(/Your account was created on 1\/1\/2024/i)).toBeInTheDocument(); expect(sendLogin.mock.calls[0][0]).toBe(false); - expect(sendUsername.mock.calls[0]).toBe(usernameInput); + expect(sendUsername.mock.calls[0][0]).toBe(usernameInput); }); it('should handle error when logging in', async () => { @@ -67,7 +67,7 @@ describe('Login component', () => { // Verify that the user information is not displayed //expect(screen.queryByText(/Hello testUser!/i)).toBeNull(); //expect(screen.queryByText(/Your account was created on/i)).toBeNull(); - expect(sendLogin.mock.calls[0]).toBe([false]); - expect(sendUsername.mock.calls[0]).toBe(usernameInput); + expect(sendLogin.mock.calls[0]).toBe(undefined); + expect(sendUsername.mock.calls[0][0]).toBe(usernameInput); }); });