-
Notifications
You must be signed in to change notification settings - Fork 15
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
Remove ts-jest warning when running tests #75
Remove ts-jest warning when running tests #75
Conversation
* This simple fix removes the annoying warning displayed below: "ts-jest[config] (WARN) Unable to find the root of the project where ts-jest has been installed." Signed-off-by: Alberto Diaz <alberto.diazdorado@tngtech.com>
e91eda1
to
3435608
Compare
* Simplify the "test" script, since the "npx" indirection is not needed here Signed-off-by: Alberto Diaz <alberto.diazdorado@tngtech.com>
5a7c152
to
f815bf7
Compare
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.
I did not see this warning but the change looks fine to me
@@ -3,6 +3,7 @@ module.exports = { | |||
globals: { | |||
'ts-jest': { | |||
tsconfig: '<rootDir>/tsconfig-test.json', | |||
packageJson: 'package.json', |
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.
ts-jest[config] (WARN) The option packageJson
is deprecated and will be removed in ts-jest 27. This option is not used by internal ts-jest
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.
Oops, I can confirm this one. Remind me to actually try the stuff I review first ...
Still, I wonder why I never saw the original warning. Maybe it was a global ts-node or jest installation interfering?
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.
Oh, I actually missed this one warning. I can try to reproduce the warnings, both on master
and on this branch, and see if I missed something
@@ -5,7 +5,7 @@ | |||
"scripts": { | |||
"start": "cd frontend && vite", | |||
"preview": "npm run build:frontend && cd frontend && vite preview", | |||
"test": "npx jest --config frontend/jest.config.js", | |||
"test": "jest --config frontend/jest.config.js", |
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.
+1: we could leave this since its installed anyway
We now have Jest 27 on master. Is this still relevant? I cannot see the warning, how would you reproduce it? |
I would close this pr since it seems outdated |
Feel free to reopen of problem persists. |
"ts-jest[config] (WARN) Unable to find the root of the project where ts-jest has been installed."
See kulshekhar/ts-jest#823 (comment)