This task list can display tasks and delete them currently. Reviewed-on: #8 Co-authored-by: Drew Galbraith <drew@tiramisu.one> Co-committed-by: Drew Galbraith <drew@tiramisu.one>
15 lines
550 B
TypeScript
15 lines
550 B
TypeScript
import { render, screen } from '@testing-library/react'
|
|
import { describe, it, expect } from 'vitest'
|
|
import Home from './home'
|
|
|
|
describe('Home component', () => {
|
|
it('should render task management interface', () => {
|
|
const mockLoaderData = { tasks: [] }
|
|
render(<Home loaderData={mockLoaderData} />)
|
|
expect(
|
|
screen.getByRole('heading', { level: 1, name: /Tasks/i })
|
|
).toBeInTheDocument()
|
|
// TaskList component should be rendered with empty state
|
|
expect(screen.getByText(/No tasks found/i)).toBeInTheDocument()
|
|
})
|
|
})
|