fix(test): cast toast via unknown to satisfy strict TS
`toast as { success, error }` direct-cast faalt omdat sonner's toast een
callable + properties is. TS2352. Cast via unknown lost het op zonder
gedrag te wijzigen.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1b94f32954
commit
2c3c5c0ab2
1 changed files with 4 additions and 1 deletions
|
|
@ -19,7 +19,10 @@ import { toast } from 'sonner'
|
||||||
|
|
||||||
const mockCreate = createProductAction as ReturnType<typeof vi.fn>
|
const mockCreate = createProductAction as ReturnType<typeof vi.fn>
|
||||||
const mockUpdate = updateProductAction as ReturnType<typeof vi.fn>
|
const mockUpdate = updateProductAction as ReturnType<typeof vi.fn>
|
||||||
const mockToast = toast as { success: ReturnType<typeof vi.fn>; error: ReturnType<typeof vi.fn> }
|
const mockToast = toast as unknown as {
|
||||||
|
success: ReturnType<typeof vi.fn>
|
||||||
|
error: ReturnType<typeof vi.fn>
|
||||||
|
}
|
||||||
|
|
||||||
const PRODUCT = {
|
const PRODUCT = {
|
||||||
id: 'prod-1',
|
id: 'prod-1',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue