CodelyTV / pr-size-labeler

🏷 Visualize and optionally limit the size of your Pull Requests
https://github.com/marketplace/actions/pull-request-size-labeler
MIT License
336 stars 58 forks source link

Use assert_equals instead of snapshots #77

Closed Chemaclass closed 3 months ago

Chemaclass commented 3 months ago

What type of PR is this?

Description

We added bashunit here https://github.com/CodelyTV/pr-size-labeler/pull/64 using snapshot testing as example. However, for these concrete tests it make more sense (as it is also simpler to read) to use a simple assert_equals

Snapshots make sense when the output to compare is something bigger/more complex than a number. When comparing a number, snapshot testing might be good for show-case example, but it is an overkilling feature for the long living of the project.

Screenshot 2024-05-25 at 19 51 59

Chemaclass commented 3 months ago

Reminder: Can we merge this? :)