Skip to content

Implement unit tests for boards-auto-installer #513

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

Merged
merged 1 commit into from
Sep 27, 2021
Merged

Conversation

AlbyIanna
Copy link
Contributor

@AlbyIanna AlbyIanna commented Sep 23, 2021

The first step for enabling us to implement unit tests on the frontend. Simply run yarn test 😄

We decided to use typemoq in order to mock our injectable services.

While doing the tests, we noticed the ResponseService were not being injected correctly as we were injecting ResponseServiceImpl directly and this was causing troubles, so we created a new interface ResponseServiceArduino.

Comment on lines -109 to +108
if (answer) {
if (answer === 'Install Manually') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is suspicious and not test related. Did we mess up with commits?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I changed this on purpose. In the current implementation, we are checking if the answer is 'Yes': if so, we install the library; in any other case, we open the library manager. I didn't like that, because if we'd add another answer like 'Nah, I don't want to', we don't want to open it.

@AlbyIanna AlbyIanna force-pushed the unit-tests branch 2 times, most recently from 93f3e60 to 98f034e Compare September 23, 2021 10:04
@AlbyIanna AlbyIanna requested a review from fstasi September 23, 2021 10:32
Copy link
Contributor

@fstasi fstasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 great PR

@AlbyIanna AlbyIanna merged commit e9db1c0 into main Sep 27, 2021
@AlbyIanna AlbyIanna deleted the unit-tests branch September 27, 2021 09:09
@per1234 per1234 added topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement labels Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants