Fix typecheck. (#14)
All checks were successful
Check / Backend (push) Successful in 14m25s
Check / Frontend (push) Successful in 2m1s

Reviewed-on: #14
Co-authored-by: Drew Galbraith <drew@tiramisu.one>
Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
Drew 2025-09-27 09:13:00 +00:00 committed by Drew
parent b3dd711ea1
commit 5fcdcef449
3 changed files with 28 additions and 7 deletions

View file

@ -2,13 +2,35 @@ import { render, screen } from '@testing-library/react'
import { describe, it, expect } from 'vitest'
import { MemoryRouter } from 'react-router'
import Home from './home'
import type { Route } from './+types/home'
describe('Home component', () => {
it('should render task management interface', () => {
const mockLoaderData = { tasks: [] }
const mockComponentProps: Route.ComponentProps = {
loaderData: { tasks: [] },
params: {},
matches: [
{
id: 'root',
params: {},
pathname: '/',
data: undefined,
loaderData: undefined,
handle: undefined,
},
{
id: 'routes/home',
params: {},
pathname: '/',
data: { tasks: [] },
loaderData: { tasks: [] },
handle: undefined,
},
],
}
render(
<MemoryRouter>
<Home loaderData={mockLoaderData} />
<Home {...mockComponentProps} />
</MemoryRouter>
)
expect(