Scrolltrigger TypeError: _win$1.matchMedia is not a function when running tests in GSAP Posted July 19, 2022 I had the same issue with a component that used Scrolltrigger and found the solution here (unrelated to gsap): https://github.com/ant-design/ant-design/issues/21096 You need to mock window.matchMedia in the setupTests.js file.
Scrolltrigger TypeError: _win$1.matchMedia is not a function when running tests
in GSAP
Posted
I had the same issue with a component that used Scrolltrigger and found the solution here (unrelated to gsap): https://github.com/ant-design/ant-design/issues/21096
You need to mock window.matchMedia in the setupTests.js file.