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

fix: include test files in language server #4696

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

boblat
Copy link

@boblat boblat commented Feb 17, 2025

Summary

  • include test files in language server so that languageService.getProgram().getTypeChecker().getTypeAtLocation(node) for a node in .test.ts file would return correct type object instead of error TypeObject
TypeObject {
  flags: 1,
  id: 5,
  intrinsicName: 'error',
  debugIntrinsicName: undefined,
  objectFlags: 52953088
}
  • remove isTestFile function from ConfigSet which is no longer used

Test plan

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

so that `languageService.getProgram().getTypeChecker().getTypeAtLocation(node)`
for a node in `.test.ts` file would return correct type node
instead of `error` TypeObject

```
TypeObject {
  flags: 1,
  id: 5,
  intrinsicName: 'error',
  debugIntrinsicName: undefined,
  objectFlags: 52953088
}
```

And remove `isTestFile` function from `ConfigSet` which is no longer used
@boblat boblat requested a review from kulshekhar as a code owner February 17, 2025 02:59
@kulshekhar
Copy link
Owner

@boblat can you update this to get tests passing?

@ahnpnl
Copy link
Collaborator

ahnpnl commented Feb 20, 2025

This is actually a breaking change so we need to hold it for a while until Jest 30 is out

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