-
Notifications
You must be signed in to change notification settings - Fork 157
tsConfig option doesn't work #171
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
Comments
The documentation is ready yet, but vue-jest 4 uses ts-jest to resolve the ts-config, so you need to use the ts-jest config options. Let me know how it goes. We're still undecided whether to use ts-jest to resolve, to write and maintain our own, or to rely on babel for compiling TS files. |
Yep, this is exactly what I came to and use this workaround at the moment (specify To me, the fact that In the meantime, we can discuss a question of how to resolve ts configuration and whether we need to rely on babel to compile TS files. |
I disagree that it's a bug. There's a PR that updates the docs for when v4 leaves beta, but at the moment npm install vue-jest will install v3, which has the |
OK, didn't know about that PR, thanks for the clarification |
Version: 4.0.0-beta.2
Problem
Documentation says that I can provide typescript configuration options using
The problem is that
tsConfig
option doesn't work and application's roottsconfig.json
is always being picked up.I found that the problem is this code:
The code above relies on
ts-jest
package to get typescript configuration and passes a whole jest config to it.ts-jest
knows nothing aboutvue-jest
, and thus ourjest.globals['vue-jest'].tsConfig
is just being ignored.Proposed solution
To fix the problem I suggest to put
tsConfig
options underjest.globals['ts-jest']
:I can prepare a PR if we agree on the solution
The text was updated successfully, but these errors were encountered: