test(app): add test for app
This commit is contained in:
1 parent
214422c92a
commit
51584886b3
2 files changed
+3
-8
No files matched your search
+2
-3
@@ -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
@@ -1,9 +1,5 @@
|
|||||||
function App() {
|
function App() {
|
||||||
return (
|
return <main></main>
|
||||||
<main>
|
|
||||||
<h1>Hello world</h1>
|
|
||||||
</main>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default App
|
export default App
|
||||||
Reference in new issue
Block a user