-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
Description
Version
28.0.0-alpha.8
Steps to reproduce
- create
jest.config.tsfileconst config = {} export default config
- run the
jestcommand
Expected behavior
tests run
Actual behavior
> jest
Error: Jest: Failed to parse the TypeScript config file C:\Users\amogus\IdeaProjects\ts-helpers\jest.config.ts
Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.
at readConfigFileAndSetRootDir (C:\Users\amogus\IdeaProjects\ts-helpers\node_modules\@jest\core\node_modules\jest-config\build\readConfigFileAndSetRootDir.js:136:13)
at async readConfig (C:\Users\amogus\IdeaProjects\ts-helpers\node_modules\@jest\core\node_modules\jest-config\build\index.js:216:18)
at async readConfigs (C:\Users\amogus\IdeaProjects\ts-helpers\node_modules\@jest\core\node_modules\jest-config\build\index.js:404:26)
at async runCLI (C:\Users\amogus\IdeaProjects\ts-helpers\node_modules\@jest\core\build\cli\index.js:132:59)
at async Object.run (C:\Users\amogus\IdeaProjects\ts-helpers\node_modules\jest-cli\build\cli\index.js:155:37)
Additional context
typescript version
4.7.0-beta
workaround
compile the jest.config.ts file first. i updated my test script in package.json like so:
{
"scripts": {
"test": "tsc jest.config.ts && jest --config jest.config.js"
}
}Environment
System:
OS: Windows 10 10.0.19044
CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
Binaries:
Node: 16.11.1 - C:\Program Files\nodejs\node.EXE
npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
npmPackages:
jest: ^28.0.0-alpha.8 => 28.0.0-alpha.8DetachHead and KotlinIsland