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 App from './App'
|
||||
|
||||
describe('App', () => {
|
||||
it('affiche le contenu minimal', () => {
|
||||
it('renders without crashing', () => {
|
||||
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() {
|
||||
return (
|
||||
<main>
|
||||
<h1>Hello world</h1>
|
||||
</main>
|
||||
)
|
||||
return <main></main>
|
||||
}
|
||||
|
||||
export default App
|
||||
Reference in new issue
Block a user