Skip to content

Commit 8737c07

Browse files
authored
fix(testing): fall back to tsconfig.json in the jest resolver (#32083)
## Current Behavior The Jest resolver requires tsconfig.(spec|test|jest).json ## Expected Behavior The Jest resolver falls back to tsconfig.json.
1 parent 2307a8d commit 8737c07

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/jest/plugins/resolver.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ function getCompilerSetup(rootDir: string) {
1111
const tsConfigPath =
1212
ts.findConfigFile(rootDir, ts.sys.fileExists, 'tsconfig.spec.json') ||
1313
ts.findConfigFile(rootDir, ts.sys.fileExists, 'tsconfig.test.json') ||
14-
ts.findConfigFile(rootDir, ts.sys.fileExists, 'tsconfig.jest.json');
14+
ts.findConfigFile(rootDir, ts.sys.fileExists, 'tsconfig.jest.json') ||
15+
ts.findConfigFile(rootDir, ts.sys.fileExists, 'tsconfig.json');
1516

1617
if (!tsConfigPath) {
1718
console.error(

0 commit comments

Comments
 (0)