[GH-ISSUE #1396] toBeLevelxxx() test functions are broken #452

Closed
opened 2026-03-16 15:23:34 +03:00 by kerem · 2 comments
Owner

Originally created by @carlos-ds on GitHub (Dec 21, 2020).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1396

I was working on writing some more unit tests for the test functions in the application. And in the process of doing so, I discovered that the function for toBeLevel2xx() and similarly toBeLevel3xx(), toBeLevel4xx(), toBeLevel5xx() aren't working as expected.

Sticking to toBeLevel2xx(): given a 200 response status, it's indicating FAIL for the simplest of assertions:

image

I'll create a PR to fix this.

Originally created by @carlos-ds on GitHub (Dec 21, 2020). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1396 I was working on writing some more unit tests for the test functions in the application. And in the process of doing so, I discovered that the function for toBeLevel2xx() and similarly toBeLevel3xx(), toBeLevel4xx(), toBeLevel5xx() aren't working as expected. Sticking to toBeLevel2xx(): given a 200 response status, it's indicating FAIL for the simplest of assertions: ![image](https://user-images.githubusercontent.com/20499950/102799343-b1228000-43b2-11eb-8efb-80e6ef9fdd87.png) I'll create a PR to fix this.
kerem closed this issue 2026-03-16 15:23:39 +03:00
Author
Owner

@liyasthomas commented on GitHub (Dec 21, 2020):

Thanks for noticing this issue and quick PR 🚀

<!-- gh-comment-id:749077394 --> @liyasthomas commented on GitHub (Dec 21, 2020): Thanks for noticing this issue and quick PR 🚀
Author
Owner

@AndrewBastin commented on GitHub (Dec 21, 2020):

Also a wonderful reasoning for why tests are important 🙃

<!-- gh-comment-id:749176109 --> @AndrewBastin commented on GitHub (Dec 21, 2020): Also a wonderful reasoning for why tests are important 🙃
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
starred/hoppscotch#452
No description provided.