Testing: Create tests for Temperature #156

Closed
opened 2026-04-07 12:14:22 +00:00 by b24johka · 5 comments
Collaborator

Tests for Javascript

Tests for Javascript
Collaborator

In the wiki(test guidelines) it mentions that we should not create tests for the front end components. Isn't the javascript all front end? I'm unsure what should be tested, if it can be clarified.

In the wiki(test guidelines) it mentions that we should not create tests for the front end components. Isn't the javascript all front end? I'm unsure what should be tested, if it can be clarified.
Collaborator

Made unit tests for useTemperature.js. I made these with reacts test library, but they should be made with jest to avoid further dependencies. Will try to fix this.

Made unit tests for useTemperature.js. I made these with reacts test library, but they should be made with jest to avoid further dependencies. Will try to fix this.
Collaborator

Is this issue still relevant? Does the tests still work?

We agreed to not test frontend stuff, which basically means all the stuff that can be interacted with by the users in localhost. This ultimately means that we are not testing HTML elements via end-to-end testing, but we are testing API fetching and everything that is not HTML and CSS.

Is this issue still relevant? Does the tests still work? We agreed to not test frontend stuff, which basically means all the stuff that can be interacted with by the users in localhost. This ultimately means that we are not testing HTML elements via end-to-end testing, but we are testing API fetching and everything that is not HTML and CSS.
Collaborator

I made the tests but it was agreed that they may be unnecessary, I am not sure if my branch was deleted or not, but the tests were finished and working, testing the states when API worked and did not work.

I made the tests but it was agreed that they may be unnecessary, I am not sure if my branch was deleted or not, but the tests were finished and working, testing the states when API worked and did not work.
Collaborator

All right, I'll close this issue but we will keep the tests in the code as an example of how to create tests for API states (if ever needed).

All right, I'll close this issue but we will keep the tests in the code as an example of how to create tests for API states (if ever needed).
Sign in to join this conversation.
No milestone
No project
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K#156
No description provided.