Closed net-illia-stetsenko closed 6 months ago
Hello there Faced with a problem when tried to test my ky client. I use Jest for testing. After running the tests I have received the following error:
ky
Jest
node_modules/ky/distribution/index.js:2 import { Ky } from './core/Ky.js'; ^^^^^^ SyntaxError: Cannot use import statement outside a module > 1 | import ky, { KyInstance } from 'ky'; | ^ 2 | 3 | import logger from '../logger'; 4 | at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.<anonymous> (src/client/api.ts:1:1) at Object.<anonymous> (tests/api-tests/v1/get.test.ts:3:1)
Thought, vite is succesfully builds the app Any thoughts?
This is a problem with your Jest config, not this package.
Hello there Faced with a problem when tried to test my
ky
client. I useJest
for testing. After running the tests I have received the following error:Thought, vite is succesfully builds the app Any thoughts?