Add some basic integration tests for MRVA#1665
Conversation
This adds some basic integration tests for MRVA using the GitHub mock API server. It only does basic assertions and still needs to stub some things because it is quite hard to properly test things since VSCode does not expose an API to e.g. answer quick pick pop-ups. I'm not sure how useful these integration tests will actually be in practice, but they do at least ensure that we are able to successfully submit a variant analysis.
charisk
left a comment
There was a problem hiding this comment.
Thanks for exploring this!
I think it's worth getting these tests in as variant analysis submission tests that happen to use the mock API rather than suggesting they're special in some way (aka "variant analysis integration tests"). What do you think? Appreciate I'm probably the one that suggested the current term in the first place 😬
| return document; | ||
| } | ||
|
|
||
| describe('Variant Analysis Integration', function() { |
There was a problem hiding this comment.
I guess these are tests around variant analysis submission. What do you think?
There was a problem hiding this comment.
Yes, that makes sense. The reason for calling it an integration test is that they are not linked to a specific class, so if I had just named the file variant-analysis.test.ts I'd expect it to test a file variant-analysis.ts. To differentiate, I added .integration.test.ts to ensure that the difference is clear. What do you think?
There was a problem hiding this comment.
I think once we start talking about integration of things it makes sense to not have a 1-to-1 mapping between tests and classes. We're testing the integration between multiple things to prove out a feature or part of it. In this case we're testing variant analysis submission.
So perhaps variant-analysis-submission-integration.test.ts?
This adds some basic integration tests for MRVA using the GitHub mock API server. It only does basic assertions and still needs to stub some things because it is quite hard to properly test things since VSCode does not expose an API to e.g. answer quick pick pop-ups.
I'm not sure how useful these integration tests will actually be in practice, but they do at least ensure that we are able to successfully submit a variant analysis.
Checklist
ready-for-doc-reviewlabel there.