Skip to content

fix: include test files in language server#4696

Open
boblat wants to merge 1 commit into
kulshekhar:mainfrom
boblat:fix/type-checker
Open

fix: include test files in language server#4696
boblat wants to merge 1 commit into
kulshekhar:mainfrom
boblat:fix/type-checker

Conversation

@boblat

@boblat boblat commented Feb 17, 2025

Copy link
Copy Markdown

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
Copy Markdown
Owner

@boblat can you update this to get tests passing?

@ahnpnl

ahnpnl commented Feb 20, 2025

Copy link
Copy Markdown
Collaborator

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

@sonarqubecloud

Copy link
Copy Markdown

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