Type the empty-content test double against the real model

The literal narrowed suppressedGitHubPR to number and typed the callback
as Mock, so neither direction was comparable and tsconfig.tc.web.json
failed on TS2352. Keeping the 'as' cast preserves checking of the fields
the double does supply.
This commit is contained in:
Brennan Benson
2026-08-27 17:18:10 -07:00
parent 508cac5435
commit 9df6bcdea0
@@ -38,14 +38,14 @@ describe('checks panel concrete content', () => {
})
it('renders a durable unlinked state that can relink before PR data refetches', () => {
const handleLinkSuppressedPullRequest = vi.fn()
const handleLinkSuppressedPullRequest = vi.fn<() => void>()
const model = {
activeReview: null,
activeWorktree: { id: 'worktree-1' },
isFolder: false,
linkedReviewNumber: null,
suppressedGitHubPR: 42,
handleLinkSuppressedPullRequest
suppressedGitHubPR: 42 as number | null,
handleLinkSuppressedPullRequest: handleLinkSuppressedPullRequest as () => void
} as ChecksPanelEmptyContentModel
render(<ChecksPanelEmptyContent model={model} />)