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 was wondering if a testing scenario with SvelteKit with TypeScript is supported. I've tried it, I have such a project and I've followed your readme by installing svelte-mock and updated my jest.config.cjs, but this error appears when I then run Jest:
Test suite failed to run
Jest encountered an unexpected token
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
...
Details:
C:\myproj\src\__tests__\MyTest.test.ts:4
import '@testing-library/jest-dom';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1728:14)
SvelteKit came with this Jest configuration out-of-the-box:
I've tried mixing, matching and merging these configurations for a bit, but I'm making no progress whatsoever. So I thought I'd just ask, is a SvelteKit and TypeScript scenario supported?
The text was updated successfully, but these errors were encountered:
Hi there,
I was wondering if a testing scenario with SvelteKit with TypeScript is supported. I've tried it, I have such a project and I've followed your readme by installing
svelte-mock
and updated myjest.config.cjs
, but this error appears when I then run Jest:SvelteKit came with this Jest configuration out-of-the-box:
I've tried mixing, matching and merging these configurations for a bit, but I'm making no progress whatsoever. So I thought I'd just ask, is a SvelteKit and TypeScript scenario supported?
The text was updated successfully, but these errors were encountered: