Skip to content

Commit adec3fc

Browse files
committed
Add fallback for tsconfig api
handles ts-jest old and new api
1 parent e643dbc commit adec3fc

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 { parsedTsConfig } = tr.configsFor(config)
70-
return { compilerOptions: parsedTsConfig.options }
69+
const configSet = tr.configsFor(config)
70+
var tsConfig = configSet.typescript || configSet.parsedTsConfig
71+
return { compilerOptions: tsConfig.options }
7172
}
7273

7374
function isValidTransformer(transformer) {

0 commit comments

Comments
 (0)