feat: scaffold frontend (Vite + React + Vitest)
- Añade scaffold de frontend con Vite y React - Configura Vitest y tests básicos (App, Navbar) - Añade QueryClient y hooks/plantillas iniciales
This commit is contained in:
19
frontend/tests/App.spec.tsx
Normal file
19
frontend/tests/App.spec.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import App from '../src/App';
|
||||
|
||||
describe('App', () => {
|
||||
it('renderiza el título Quasar', () => {
|
||||
render(<App />);
|
||||
expect(screen.getByText('Quasar')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import App from '../src/App';
|
||||
|
||||
describe('App', () => {
|
||||
it('renders Quasar', () => {
|
||||
render(<App />);
|
||||
expect(screen.getByText(/Quasar/i)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
21
frontend/tests/components/Navbar.spec.tsx
Normal file
21
frontend/tests/components/Navbar.spec.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import Navbar from '../../src/components/layout/Navbar';
|
||||
|
||||
describe('Navbar', () => {
|
||||
it('muestra enlaces ROMs y Games', () => {
|
||||
render(<Navbar />);
|
||||
expect(screen.getByText('ROMs')).toBeInTheDocument();
|
||||
expect(screen.getByText('Games')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import Navbar from '../../src/components/layout/Navbar';
|
||||
|
||||
describe('Navbar', () => {
|
||||
it('renders ROMs and Games links', () => {
|
||||
render(<Navbar />);
|
||||
expect(screen.getByText(/ROMs/)).toBeInTheDocument();
|
||||
expect(screen.getByText(/Games/)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user