()
| 32 | |
| 33 | // Setup global mocks |
| 34 | export const setupGlobalMocks = () => { |
| 35 | // Chrome mock已经在vitest.setup.ts中通过chromeMock.init()设置了 |
| 36 | vi.stubGlobal("open", vi.fn()); |
| 37 | vi.stubGlobal("location", { href: "https://example.com" }); |
| 38 | const matchMedia0 = { |
| 39 | matches: false, |
| 40 | addEventListener: vi.fn(), |
| 41 | }; |
| 42 | vi.stubGlobal("matchMedia", () => matchMedia0); |
| 43 | }; |
| 44 | |
| 45 | export * from "@testing-library/react"; |
| 46 | export { customRender as render }; |
no test coverage detected