1 2 3 4 5 6 7 8 9 10 11 12 13require('@testing-library/jest-dom/extend-expect') // matchers for view tests window.HTMLElement.prototype.scrollTo = jest.fn() class MutationObserver { constructor() { this.observe = jest.fn() this.disconnect = jest.fn() } } window.MutationObserver = MutationObserver