Skip to content

Commit f051cf7

Browse files
committed
feat(test): migrate from jest to vitest
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent 87e1327 commit f051cf7

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

src/renderer/__helpers__/vitest.setup.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ Object.defineProperty(navigator, 'clipboard', {
6060
* - https://github.com/primer/react/blob/main/packages/react/src/utils/test-helpers.tsx
6161
*/
6262

63-
// Mock `showPopover` used by Primer React TooltipV2
64-
if (!('showPopover' in HTMLElement.prototype)) {
65-
(HTMLElement.prototype as any).showPopover = vi.fn();
66-
}
67-
68-
// Mock `hidePopover` used by Primer React TooltipV2
69-
if (!('hidePopover' in HTMLElement.prototype)) {
70-
(HTMLElement.prototype as any).hidePopover = vi.fn();
71-
}
63+
// Mock `showPopover` and `hidePopover` used by Primer React TooltipV2
64+
global.HTMLElement.prototype.showPopover = vi.fn();
65+
global.HTMLElement.prototype.hidePopover = vi.fn();

0 commit comments

Comments
 (0)