test(app): add test for app

This commit is contained in:
devcodetools committed 2026-09-13 14:53:01 +02:00
1 parent 214422c92a
commit 51584886b3
2 files changed
+3 -8

No files matched your search

+2 -3
View File
@@ -1,10 +1,9 @@
import { describe, expect, it } from 'vitest'
import { render, screen } from '@testing-library/react' import { render, screen } from '@testing-library/react'
import App from './App' import App from './App'
describe('App', () => { describe('App', () => {
it('affiche le contenu minimal', () => { it('renders without crashing', () => {
render(<App />) render(<App />)
expect(screen.getByRole('heading', { level: 1, name: 'Hello world' })).toBeInTheDocument() expect(screen.getByRole('main')).toBeInTheDocument()
}) })
}) })
+1 -5
View File
@@ -1,9 +1,5 @@
function App() { function App() {
return ( return <main></main>
<main>
<h1>Hello world</h1>
</main>
)
} }
export default App export default App