-
Notifications
You must be signed in to change notification settings - Fork 157
fix: do not require ts-jest and typescript #307
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
Conversation
@lmiller1990 Time for a release? ;-) |
I can do one, was hoping to look at #309 first, since we currently assume At the moment you just need to install Either way we can probably do a release in the next day or two. |
@lmiller1990 I see that the other issue you pointed to is already solved. Could you release a new version with the both fixes? Thank you! :) |
Ok I will do it this week |
It's out https://github.com/vuejs/vue-jest/releases/tag/v5.0.0-alpha.8 Very tiny release. I hope I can dedicate some time soon to fixing the many TS problems we have. I think it should not be too difficult. |
@@ -64,6 +65,11 @@ const getBabelOptions = function loadBabelOptions(filename, options = {}) { | |||
} | |||
|
|||
const getTsJestConfig = function getTsJestConfig(config) { | |||
const isUsingTs = resolveTsConfigSync(process.cwd()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should support tsconfig not place at root dir.
If run npm run jest
, process.cwd()
always be root dir. I put tsconfig file at <rootDir>/sub
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a problem. We should support something like
// jest.config.js
module.exports = {
globals: {
'vue-jest': {
tsconfig: './some/path/tsconfig.json'
}
}
}
Would you like to make a PR? I can review + release when it's done. If I need to do it, it might take a while, I have a few other projects I need to work on like Test Utils 2.0.0 release etc. I'd really appreciate the help!
We can use the
tsconfig
module to see if atsconfig.json
exists. If it doesn't, we can assume they are not using TypeScript. This removes the need to install TS for non TS projects.