chore(site): clean up mocks after each test (#12805)

This commit is contained in:
Bruno Quaresma
2024-04-01 13:14:36 -03:00
committed by GitHub
parent cfb94284e0
commit 2f437005b7
10 changed files with 154 additions and 179 deletions

View File

@ -29,4 +29,16 @@ Object.defineProperties(globalThis, {
FormData: { value: FormData },
Request: { value: Request },
Response: { value: Response },
matchMedia: {
value: (query) => ({
matches: false,
media: query,
onchange: null,
addListener: jest.fn(),
removeListener: jest.fn(),
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
}),
},
});