test: add another test and fix typo #30

Merged
Ghost merged 0 commits from refs/pull/30/head into main 2025-10-31 22:52:27 +00:00
Ghost commented 2025-10-31 22:52:16 +00:00 (Migrated from codeberg.org)

Adds another test, since we've started collecting coverage I might as well lean into it. I could easily write many more tests to push the coverage higher, but a lot of them wouldn't really make sense as I'd just end up mocking everything the function does. (i.e. we have quite a few files that pretty much call for user input, send it to an API, log it, etc) Nothing particularly interesting that would be worth testing, and there's no point in a test that just calling 100% mocked functions behind the scenes.

I also update all test cases to have data more resembling real-world data. This is just so when reading through code it's easier to see what kind of values are expected or not rather than a or b which isn't particularly meaningful.

Chores

  • Fixes a small typo in one of our JSDocs.
Adds another test, since we've started collecting coverage I might as well lean into it. I could easily write many more tests to push the coverage higher, but a lot of them wouldn't really make sense as I'd just end up mocking everything the function does. (i.e. we have quite a few files that pretty much call for user input, send it to an API, log it, etc) Nothing particularly interesting that would be worth testing, and there's no point in a test that just calling 100% mocked functions behind the scenes. I also update all test cases to have data more resembling real-world data. This is just so when reading through code it's easier to see what kind of values are expected or not rather than `a` or `b` which isn't particularly meaningful. ## Chores * Fixes a small typo in one of our JSDocs.
Ghost commented 2025-10-31 22:52:27 +00:00 (Migrated from codeberg.org)

mentioned in commit 0d1a02833b

mentioned in commit 0d1a02833b852b1b25c050382e233d0a35b9da8e
Sign in to join this conversation.
No reviewers
No labels
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
SethFalco/matrix-stream-alerts!30
No description provided.