Vitest bails with an odd "TypeError: re.test is not a function" #146
-
Hello, I'm using Vitest, Vue Testutils and happy-dom (all latest) for my unit and component tests. I'm wondering if anybody else faced this issue which seems rather odd.
If I i.e. comment out the VBtn import and tag the tests work... for what's left of my own code. Any ideas welcome incl. if the "culprit" is know to be some other lib. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
This is very unusual. I can't see how it could be related to Vuetensils components given the error, but the debugging suggests that it may be. Could you create a reproduction in Stackblitz or Codesandbox so I can get a better idea? |
Beta Was this translation helpful? Give feedback.
-
I guess I found the source... When I copied the various config setting over, it broke with Vitest's I somehow overlooked the fact that your components also contain "style" elements, which is why the tests for our components that don't have any also failed. Thanks & have a nice day. |
Beta Was this translation helpful? Give feedback.
I guess I found the source...
When I copied the various config setting over, it broke with Vitest's
css
directive being a glob pattern and not a RexEg -- hence thenot a function
failure...I somehow overlooked the fact that your components also contain "style" elements, which is why the tests for our components that don't have any also failed.
Thanks & have a nice day.