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 · May be fixed by procrafts/kata-diamond#20, procrafts/kata-diamond#21 or procrafts/kata-diamond#22
Closed

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment