Closed
Description
I just tried latest mocked
helper and noticed couple of things, prevents to use it.
Issue :
node_modules/ts-jest/dist/types.d.ts:2:25 - error TS2307: Cannot find module 'babel__core'.
2 import * as _babel from 'babel__core';
~~~~~~~~~~~~~
node_modules/ts-jest/dist/types.d.ts:3:8 - error TS1192: Module '"/Users/ojkwon/github/xxx/node_modules/typescript/lib/typescript"' has no default export.
3 import _ts, { CompilerOptions, SourceFile, TransformerFactory } from 'typescript';
Expected behavior :
-
@types/babel__core
is devDependency (https://github.com/kulshekhar/ts-jest/blob/master/package.json#L77), so if consumer doesn't have those types it'll break. -
import _ts
if consumer's codebase do not useesModuleInterop
, can't make this work.
Debug log:
log file content
# content of ts-jest.log :
Activity
huafu commentedon Oct 1, 2018
Thanks @kwonoj for reporting the issue!
fix(helpers): deprecate import from ts-jest, now ts-jest/utils
fix(helpers): deprecate import from ts-jest, now ts-jest/utils