Mock CSS.supports in view tests

This commit is contained in:
Koen Vlaswinkel
2023-03-14 10:26:53 +01:00
parent 4a295098e5
commit 605315c70d

View File

@@ -15,6 +15,11 @@ Object.defineProperty(window, "matchMedia", {
})),
});
// Used by Primer React
(window as any).CSS = {
supports: jest.fn().mockResolvedValue(false),
};
// Store this on the window so we can mock it
(window as any).vsCodeApi = {
postMessage: jest.fn(),