-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Cover all Editor implementations with tests #156
Labels
📦 Refactor
Change that doesn't modify existing behavior
Comments
nicoespeon
added
the
💪 Improvement
Refactoring doesn't run on a specific case or result could be optimized
label
Sep 5, 2020
nicoespeon
added
📦 Refactor
Change that doesn't modify existing behavior
and removed
💪 Improvement
Refactoring doesn't run on a specific case or result could be optimized
labels
Dec 10, 2020
Regarding the first option, here are interesting hints: |
Got them running! Remaining tasks before calling it a day:
|
Done! I updated the docs accordingly: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had decided not to write integration tests because I couldn't make Jest work with vscode-api.
It means that changes made to the VSCodeEditor implementation should be manually tested. It's OK because it doesn't change very often.
But as I'm implemented a
VueVSCodeEditor
now, I have the same problem. I've been thinking about it, and I have 2 solutions in mind:vscode-api
in a Facade that I can inject to VSCode editors. I will be able to Subclass & Override it in tests, so I could apply the existing contract tests to VSCodeEditor and VueVSCodeEditor. This will bring more code in the "Domain" part of Abracadabra and leave very simple code in the Infrastructure part, which is desirable if I can't test my Editor implementations in integration.I finally managed to get Jest & mocha working together, so no need for both scenario described above.
What would scenario 2 have looked like?
What we have now
What we will have after
And in tests:
If we can do integration tests, this would still be interesting in making
vscode-api
upgrades easier. But not by much. It would be equally fine to testVSCodeEditor
in integration because it's still small.The text was updated successfully, but these errors were encountered: