-
Notifications
You must be signed in to change notification settings - Fork 30
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
Initial setup of unit tests #311
Conversation
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.
Thanks a lot @Achal1607 for getting the unit tests framework added.
Please do rebase against main after merging #310.
- That should remove many of the files/changes from the scope of this PR.
- Some work maybe needed to incorporate the changes on newly added tests on main like the localisation tests.
Most of my comments are queries for clarification, with few minor code suggestions.
Thanks a lot.
65a34f3
to
0afd0c8
Compare
17cab36
to
e1402de
Compare
7482c62
to
c8a23a4
Compare
added unit tests for JDK Downloader view
updated license header
c8a23a4
to
1deb2db
Compare
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.
Thanks a lot @Achal1607. LGTM 👍
This PR introduces an initial setup for unit testing to help validate fixes more quickly, without the need for a full NetBeans environment and VS Code UI runs. This setup includes sample unit tests for
JDKDownloaderView
inview.ts
and adds few development dependencies for testing and mocking. A few VS Code-related mocks are also included.List of DevDependencies added and Justification:
@istanbuljs/nyc-config-typescript
:A code coverage tool, with TypeScript support, ensuring code coverage reporting for TypeScript code.
@types/chai
&chai
:chai
is a popular assertion library used for writing readable and expressive test assertions.@types/chai
provides TypeScript definitions forchai
.@types/sinon
&sinon
:sinon
is a library for creating mocks, spies, and stubs, useful for isolating and testing code components.@types/sinon
provides TypeScript definitions.ts-mockito
:Provides a simpler API for creating mocks in TypeScript, offering an alternative to
sinon
for creating clean, readable mocks in TypeScript. Sinon doesn't have support for mocking interfaces and namesapce. So, it is also required.vscode-uri
:Used for handling and manipulating URIs in a way consistent with VS Code’s own URI utilities, especially useful for file and path manipulations within tests.