-
Notifications
You must be signed in to change notification settings - Fork 113
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: unify doNotSuggest #213
base: main
Are you sure you want to change the base?
Conversation
@@ -74,7 +74,7 @@ suite('JSON Completion', () => { | |||
const position = Position.create(0, offset); | |||
const jsonDoc = ls.parseJSONDocument(document); | |||
return ls.doComplete(document, position, jsonDoc).then(list => { | |||
if (expected.count) { | |||
if (typeof expected.count === 'number') { |
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.
if you call this method with expected.count === 0
it won't check zero length (assert.equal(list!.items.length, expected.count
)
but after this change, it seems that test for test('In comment', ...
is not correct
@microsoft-github-policy-service agree |
@p-spacek There's a test failure, if you can have a look... |
@aeschli check the description and code comment please, Yes, there is an issue with comment implementation. The issue was there before. So to be honest, I am not sure how to fix it I am sorry, I shouldn't combine 2 different things together (feature + issue(failing test)), it's confusing now... |
What does this PR do?
related to this conversation redhat-developer/yaml-language-server#911 (comment)
exclude doNotSuggest schema from autocompletion
doNotSuggest
was already there but implemented only for the simple object properties.This PR uses
doNotSuggest
also for other scenarios: anyOf, valuesPROBLEM
this PR contains also a fix for the test utility
testCompletionsFor
, there is an issue with checking zero suggested items.the previous implementation doesn't allow to check 'no result' with
expected: { count: 0}
but when I fixed the test utils, the test
In comment
failsOptions:
Is it tested? How?
adds unit tests