refactor: type improvement of file Announcement.spec.tsx (#2853)

This commit is contained in:
yusheng chen authored and GitHub committed 2025-04-12 23:21:43 -07:00
1 parent 0dabb06cb2
commit ca2b4168d5
1 file changed
+2 -1
@@ -1,11 +1,12 @@
import React from "react"
import type { ComponentProps } from "react"
import { render, screen, fireEvent } from "@testing-library/react"
import { describe, it, expect, vi } from "vitest"
import Announcement from "../Announcement"
vi.mock("@vscode/webview-ui-toolkit/react", () => ({
useTheme: () => ({ themeType: "light" }),
VSCodeButton: (props: any) => <button {...props}>{props.children}</button>,
VSCodeButton: (props: ComponentProps<"button">) => <button {...props}>{props.children}</button>,
VSCodeLink: ({ children }: { children: React.ReactNode }) => <a>{children}</a>,
}))