Arquisoft / wiq_en1b

wiq_en1b
https://youtu.be/r2XqDUHj3zU
0 stars 1 forks source link

Jest Tests FrontEnd #66

Closed uo289267 closed 4 months ago

uo289267 commented 4 months ago

Creation of tests for all React components

uo289267 commented 4 months ago

import { render, screen } from '@testing-library/react';
import GameMenu from './GameMenu';
import { MemoryRouter } from 'react-router-dom';

test('renders learn react link', () => {
  render(<MemoryRouter><GameMenu /></MemoryRouter>);
  //const linkElement = screen.getByText(/Welcome to the 2024 edition of the Software Architecture course/i);
  //expect(linkElement).toBeInTheDocument();
});
´´´
lauratbg commented 4 months ago

image This warning appears, we should find a solution

lauratbg commented 4 months ago

That warning is solved adding the following code to setuptests.js image