mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 16:03:49 +00:00
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:
+3
-3
@@ -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} />)
|
||||
|
||||
Reference in New Issue
Block a user