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

Enhanced ts-jest cli to fix warning message. #2019

Closed
wants to merge 2 commits into from

Conversation

beenotung
Copy link

Summary

Before this patch, when I run jest test with jest.config.js generated
ts-jest config:init, it shows below warning message:

ts-jest[config] (WARN) Unable to find the root of the project where ts-jest has been installed.

This patch addresses the issue #959

Test plan

A test case in src/cli/cli.spec.ts is updated to reflect this changes.

Does this PR introduce a breaking change?

  • Yes
  • No

Before this patch, when I run jest test with jest.config.js generated
`ts-jest config:init`, it shows below warning message:

```
ts-jest[config] (WARN) Unable to find the root of the project where ts-jest has been installed.
```

This patch addresses the issue kulshekhar#959
@beenotung beenotung requested a review from kulshekhar as a code owner October 10, 2020 05:49
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6106

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 93.209%

Totals Coverage Status
Change from base Build 6104: 0.003%
Covered Lines: 1108
Relevant Lines: 1142

💛 - Coveralls

@ahnpnl
Copy link
Collaborator

ahnpnl commented Oct 10, 2020

I think this doesn’t fix the actually problem. The problem comes from

let pkgPath = resolve(tsJestRoot, '..', '..', 'package.json')

I think instead of this fix, you should provide a fallback mechanism for that piece of codes.

@ahnpnl ahnpnl closed this Feb 24, 2021
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.

3 participants