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
I've tried running tests on components that include this package but they end up failing.
At first I would get TypeError: Flatpickr is not a constructor
then I added 'jest-svelte-resolver' to my jest.config.js which gave me SyntaxError: Unexpected token '<'
So I added transformIgnorePatterns: ['node_modules/(?!svelte-flatpickr)/'], in the jest.config
and this is where I am stuck. I keep getting TypeError: flatpickr is not a function
I've previously tried doing import * as Flatpickr from 'svelte-flatpickr';, that would bypass the test problems, but break the app.
I think this is fundamentally an issue with svelte-jester (svelteness/svelte-jester#16). Even when taking svelte-flatpickr out of the loop entirely and trying to just import flatpickr from 'flatpickr' also failed, despite having "allowSyntheticDefaultImports": true in tsconfig.json.
I've tried running tests on components that include this package but they end up failing.
At first I would get
TypeError: Flatpickr is not a constructor
then I added 'jest-svelte-resolver' to my jest.config.js which gave me
SyntaxError: Unexpected token '<'
So I added
transformIgnorePatterns: ['node_modules/(?!svelte-flatpickr)/'],
in the jest.configand this is where I am stuck. I keep getting
TypeError: flatpickr is not a function
I've previously tried doing
import * as Flatpickr from 'svelte-flatpickr';
, that would bypass the test problems, but break the app.jest.config.js
Has anyone been able to fix this issue?
The text was updated successfully, but these errors were encountered: