-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
More thoroughly test navigateTo #25239
Conversation
@@ -1592,16 +1592,15 @@ namespace ts.server { | |||
const bakedItem: protocol.NavtoItem = { | |||
name: navItem.name, | |||
kind: navItem.kind, | |||
isCaseSensitive: navItem.isCaseSensitive, | |||
matchKind: navItem.matchKind, | |||
file: navItem.fileName, | |||
start: scriptInfo.positionToLineOffset(navItem.textSpan.start), | |||
end: scriptInfo.positionToLineOffset(textSpanEnd(navItem.textSpan)) | |||
}; | |||
if (navItem.kindModifiers && (navItem.kindModifiers !== "")) { | |||
bakedItem.kindModifiers = navItem.kindModifiers; | |||
} |
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.
"none"
wasn't a possible value (detected by changing the type to a string literal union), so in practice matchKind
would always be set.
@@ -1592,16 +1592,15 @@ namespace ts.server { | |||
const bakedItem: protocol.NavtoItem = { | |||
name: navItem.name, | |||
kind: navItem.kind, | |||
isCaseSensitive: navItem.isCaseSensitive, |
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.
isCaseSensitive
was declared optional but we never set it anywhere.
Instead of just testing the number of items,
assert.deepEqual
the exact contents of the response.Also fixes a bug where
kindModifiers
could be undefined when passed throughclient.ts
(should be""
).Discovered #25233 and #25237.