mirror of
https://github.com/mantinedev/next-app-template.git
synced 2025-11-09 20:12:02 +10:00
Add Jest scrollIntoView mock
This commit is contained in:
@ -2,6 +2,7 @@ require('@testing-library/jest-dom');
|
||||
|
||||
const { getComputedStyle } = window;
|
||||
window.getComputedStyle = (elt) => getComputedStyle(elt);
|
||||
window.HTMLElement.prototype.scrollIntoView = () => {};
|
||||
|
||||
Object.defineProperty(window, 'matchMedia', {
|
||||
writable: true,
|
||||
|
||||
Reference in New Issue
Block a user