Fix typecheck.
All checks were successful
Check / Backend (pull_request) Successful in 4m56s
Check / Frontend (pull_request) Successful in 1m56s

This commit is contained in:
Drew 2025-09-27 01:46:13 -07:00
parent b3dd711ea1
commit b0750c82d9
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(