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
> @ test /home/projects/vitejs-vite-edm1pg
> cross-env TS_NODE_TRANSPILE_ONLY=yes jest --passWithNoTests
Error: Jest: Failed to parse the TypeScript config file /home/projects/vitejs-vite-edm1pg/jest.config.ts
TSError: ⨯ Unable to compile TypeScript:
error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
at readConfigFileAndSetRootDir (/home/projects/vitejs-vite-edm1pg/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/jest-config/build/readConfigFileAndSetRootDir.js:116:13)
at async readInitialOptions (/home/projects/vitejs-vite-edm1pg/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/jest-config/build/index.js:403:13)
at async readConfig (/home/projects/vitejs-vite-edm1pg/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/jest-config/build/index.js:147:48)
at async readConfigs (/home/projects/vitejs-vite-edm1pg/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/jest-config/build/index.js:424:26)
at async runCLI (/home/projects/vitejs-vite-edm1pg/node_modules/.pnpm/@[email protected][email protected]/node_modules/@jest/core/build/cli/index.js:151:59)
at async Object.run (/home/projects/vitejs-vite-edm1pg/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/jest-cli/build/run.js:130:37)
ELIFECYCLE Test failed. See above for more details.
What happens?
新建 umi simple app 后,使用
umi g jest
增加 jest 配置,无法运行 test。Mini Showcase Repository(REQUIRED)
https://stackblitz.com/edit/umi-edm1pg
How To Reproduce
Steps to reproduce the behavior:
pnpm create umi
生成 Simple Apppnpm umi g jest
配置使用 jestpnpm test
运行测试Expected behavior
Actual behavior
Temporary workaround:
src/.umi/tsconfig.json
中已设置"module": "esnext",
,注释掉"moduleResolution": "bundler",
后,测试可正常运行,但此时所有模块导出均错误。Context
The text was updated successfully, but these errors were encountered: