Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

declaration files are not emitted #745

Closed
sandangel opened this issue Sep 21, 2018 · 6 comments
Closed

declaration files are not emitted #745

sandangel opened this issue Sep 21, 2018 · 6 comments

Comments

@sandangel
Copy link

Issue :

I want to author jest.config in ts file. Could you please add declaration: true?

Expected behavior :

this should work:

// jest.config.ts
import { pathToModuleNameMapper } from 'ts-jest';

Debug log:

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

Minimal repo :

@huafu
Copy link
Collaborator

huafu commented Sep 21, 2018

@sandangel thanks for reporting this. Unfortunately I don't think having your Jest config in ts will work. Or are you compiling it first?

Update: anyway, the declaration not generated is indeed an issue

@huafu huafu added this to the 23.10.2 milestone Sep 21, 2018
@sandangel
Copy link
Author

sandangel commented Sep 21, 2018

I have it run with ts-node and gulp, I don' use jest directly. I just need pathToModuleNameMapper auto completion

@huafu
Copy link
Collaborator

huafu commented Sep 21, 2018

@sandangel are you on our Slack channel? Would love to learn more about your test pipeline for informational purpose.

@sandangel
Copy link
Author

No I'm not on your Slack channel. I use this gulp plugin https://github.com/alansouzati/gulp-jest
to call jest in gulp script. I only have to pass configuration object there. which mean, no jest.config.js needed. I just want to have type completion with ts-jest to provide type check for ts-jest config and some helper method like pathsToModuleNameMapper

@huafu
Copy link
Collaborator

huafu commented Sep 21, 2018

Yeah I understood what you wanted ;-)
For your pipeline, do you have a watch option so that jest runs in watch mode while you edit your source and test files?

@sandangel
Copy link
Author

I use watch: true option in jest.InitialOptions. I don't use gulp.watch

@huafu huafu changed the title ts-jest declaration: true declaration files are not emitted Sep 21, 2018
huafu added a commit to huafu/ts-jest that referenced this issue Sep 21, 2018
huafu added a commit to huafu/ts-jest that referenced this issue Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants