You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Matt, have you tried to unit test the theme-provider? I'm stuck a little bit on the following error from Vitest:
Vitest caught 1 unhandled error during the test run.
This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: No matches found
❯ invariant node_modules/@remix-run/react/dist/invariant.js:15:11
❯ Object.send node_modules/@remix-run/react/dist/transition.js:217:11
❯ Object.submit node_modules/@remix-run/react/dist/components.js:933:25
❯ app/lib/theme-provider.tsx:46:13
46| }
47|
48|returngetPreferredTheme();
| ^
49| });
50|
❯ commitHookEffectListMount node_modules/react-dom/cjs/react-dom.development.js:23150:26
❯ commitPassiveMountOnFiber node_modules/react-dom/cjs/react-dom.development.js:24931:11
❯ commitPassiveMountEffects_complete node_modules/react-dom/cjs/react-dom.development.js:24891:9
❯ commitPassiveMountEffects_begin node_modules/react-dom/cjs/react-dom.development.js:24878:7
❯ commitPassiveMountEffects node_modules/react-dom/cjs/react-dom.development.js:24866:3
❯ flushPassiveEffectsImpl node_modules/react-dom/cjs/react-dom.development.js:27039:3
which I can't really track down and fix. I have though it have something to do with throw Error() inside useTheme hook but after some refactoring Vitest still throws the above error.
The text was updated successfully, but these errors were encountered:
Hi Matt, have you tried to unit test the
theme-provider
? I'm stuck a little bit on the following error from Vitest:which I can't really track down and fix. I have though it have something to do with
throw Error()
insideuseTheme
hook but after some refactoring Vitest still throws the above error.The text was updated successfully, but these errors were encountered: