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
First of all, thank you for your work! It really helped a lot while reworking a whole project with vue3 and vite.
While testing with only importing without any prefix I could get it running.
But I stumbled across a problem while unit testing my components.
I imported a svg in order to use it as a background-image:
import CloudsSvg from '~client/assets/svg/registration_animation_clouds.svg?url'
<div :style="{ backgroundImage:`url(${CloudsSvg})` }" >
In dev and prod build everything runs fine, but the test keeps failing.
I tried the approach from here: #35
My jest.config.js looks like this:
I know the problem is '.+\\.(svg?url)$': '<rootDir>/configs/tests/__mocks__/svgUrlMock.ts',, but I can't find a working solution.
Is there a clever way to do this, or is it possible to add native jest support?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
First of all, thank you for your work! It really helped a lot while reworking a whole project with vue3 and vite.
While testing with only importing without any prefix I could get it running.
But I stumbled across a problem while unit testing my components.
I imported a svg in order to use it as a background-image:
In dev and prod build everything runs fine, but the test keeps failing.
I tried the approach from here: #35
My
jest.config.js
looks like this:I know the problem is
'.+\\.(svg?url)$': '<rootDir>/configs/tests/__mocks__/svgUrlMock.ts',
, but I can't find a working solution.Is there a clever way to do this, or is it possible to add native jest support?
Thanks in advance!
The text was updated successfully, but these errors were encountered: