Chore: miscellaneous frontend testing

This commit is contained in:
shamoon
2024-02-23 23:36:03 -08:00
parent 4c6c976f63
commit 966eb00de0
11 changed files with 126 additions and 12 deletions

View File

@@ -94,6 +94,10 @@ Object.defineProperty(navigator, 'clipboard', {
})
Object.defineProperty(navigator, 'canShare', { value: () => true })
Object.defineProperty(window, 'ResizeObserver', { value: mock() })
Object.defineProperty(window, 'location', {
configurable: true,
value: { reload: jest.fn() },
})
HTMLCanvasElement.prototype.getContext = <
typeof HTMLCanvasElement.prototype.getContext