Convert call sites to use typed commands (part 6): createVSCodeCommandManager in tests#2237
Merged
robertbrignull merged 2 commits intomainfrom Mar 30, 2023
Merged
Conversation
koesie10
reviewed
Mar 27, 2023
Member
koesie10
left a comment
There was a problem hiding this comment.
This approach makes sense to me, I don't think we should refactor all tests to call directly into the methods right now.
56003ad to
1043448
Compare
koesie10
approved these changes
Mar 30, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have quite a few tests that trigger commands as part of them. They do this to call code that isn't accessible otherwise. The easiest way to convert these tests to use typed commands is to use
createVSCodeCommandManagerto get a real command manager than will trigger real commands. By doing this the the behaviour should be exactly the same except that the commands are type checked.It would likely be better overall if these tests were able to call code without using commands. That would likely lead to better organised code. However, that is more of a long term goal.
Does this make sense? Or should we put in more effort to refactor the tests? Or something else entirely?
Checklist
ready-for-doc-reviewlabel there.