Skip to content

Commit e5f2e9d

Browse files
committed
Add tsConfig fallback object
1 parent f79a96e commit e5f2e9d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/utils.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ const getBabelOptions = function loadBabelOptions(filename, options = {}) {
6666
const getTsJestConfig = function getTsJestConfig(config) {
6767
const createTransformer = require('ts-jest').createTransformer
6868
const tr = createTransformer()
69-
const { typescript } = tr.configsFor(config)
70-
return { compilerOptions: typescript.options }
69+
const configsFor = tr.configsFor(config)
70+
const tsConfig = configsFor.typescript || configsFor.parsedTsConfig
71+
return { compilerOptions: tsConfig.options }
7172
}
7273

7374
function isValidTransformer(transformer) {

0 commit comments

Comments
 (0)