import { mockAnimationsApi, mockResizeObserver } from 'jsdom-testing-mocks' mockAnimationsApi() // `Element.prototype.getAnimations` and `CSSTransition` polyfill mockResizeObserver() // `ResizeObserver` polyfill // JSDOM Doesn't implement innerText yet: https://github.com/jsdom/jsdom/issues/1245 // So this is a hacky way of implementing it using `textContent`. // Real implementation doesn't use textContent because: // > textContent gets the content of all elements, including