Skip to content

mocked helper function implicitly requires config / dependencies #782

Closed
@kwonoj

Description

@kwonoj

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 :

  1. @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.

  2. import _ts
    if consumer's codebase do not use esModuleInterop, can't make this work.

Debug log:

log file content
# content of ts-jest.log :

Minimal repo :

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
`mocked` helper function implicitly requires config / dependencies · Issue #782 · kulshekhar/ts-jest