v2.4.1 using toast and running tests with vitest gives matchMedia is not a function
#378
rwdevops999
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
stacktrace:
React Router caught the following error during render TypeError: matchMedia is not a function
at prefersReducedMotion (file:///Users/rudiwelter/Workdir/Tut-O-Pedia/Tut-O-Pedia-Spock/Frontend/node_modules/react-hot-toast/src/core/utils.ts:14:26)
at getPositionStyle (file:///Users/rudiwelter/Workdir/Tut-O-Pedia/Tut-O-Pedia-Spock/Frontend/node_modules/react-hot-toast/src/components/toaster.tsx:67:17)
at file:///Users/rudiwelter/Workdir/Tut-O-Pedia/Tut-O-Pedia-Spock/Frontend/node_modules/react-hot-toast/src/components/toaster.tsx:119:31
at Array.map ()
at Ie (file:///Users/rudiwelter/Workdir/Tut-O-Pedia/Tut-O-Pedia-Spock/Frontend/node_modules/react-hot-toast/src/components/toaster.tsx:112:15)
at renderWithHooks (/Users/rudiwelter/Workdir/Tut-O-Pedia/Tut-O-Pedia-Spock/Frontend/node_modules/react-dom/cjs/react-dom.development.js:15486:18)
at mountIndeterminateComponent (/Users/rudiwelter/Workdir/Tut-O-Pedia/Tut-O-Pedia-Spock/Frontend/node_modules/react-dom/cjs/react-dom.development.js:20103:13)
at beginWork (/Users/rudiwelter/Workdir/Tut-O-Pedia/Tut-O-Pedia-Spock/Frontend/node_modules/react-dom/cjs/react-dom.development.js:21626:16)
at beginWork$1 (/Users/rudiwelter/Workdir/Tut-O-Pedia/Tut-O-Pedia-Spock/Frontend/node_modules/react-dom/cjs/react-dom.development.js:27465:14)
at performUnitOfWork (/Users/rudiwelter/Workdir/Tut-O-Pedia/Tut-O-Pedia-Spock/Frontend/node_modules/react-dom/cjs/react-dom.development.js:26599:12) {
componentStack: '\n' +
' at Ie (file:///Users/rudiwelter/Workdir/Tut-O-Pedia/Tut-O-Pedia-Spock/Frontend/node_modules/react-hot-toast/dist/index.mjs:178:26)\n' +
Beta Was this translation helpful? Give feedback.
All reactions