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

Remove ts-jest warning when running tests #75

Closed

Conversation

albertodiazdorado
Copy link
Collaborator

  • 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."

See kulshekhar/ts-jest#823 (comment)

* 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>
@albertodiazdorado albertodiazdorado force-pushed the remove-ts-jest-warning-when-running-tests branch from e91eda1 to 3435608 Compare September 3, 2021 15:30
* Simplify the "test" script, since the "npx" indirection is not needed here

Signed-off-by: Alberto Diaz <alberto.diazdorado@tngtech.com>
@albertodiazdorado albertodiazdorado force-pushed the remove-ts-jest-warning-when-running-tests branch from 5a7c152 to f815bf7 Compare September 9, 2021 14:30
Copy link
Member

@lukastaegert lukastaegert left a 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',
Copy link
Collaborator

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

Copy link
Member

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?

Copy link
Collaborator Author

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",
Copy link
Collaborator

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

@lukastaegert
Copy link
Member

We now have Jest 27 on master. Is this still relevant? I cannot see the warning, how would you reproduce it?

@andreashille
Copy link
Collaborator

I would close this pr since it seems outdated

@andreashille
Copy link
Collaborator

Feel free to reopen of problem persists.

@andreashille andreashille deleted the remove-ts-jest-warning-when-running-tests branch March 30, 2022 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants