ubiquibot / conversation-rewards

0 stars 10 forks source link

feat: tests for modules #14

Closed gentlementlegen closed 2 months ago

gentlementlegen commented 2 months ago

Depends on https://github.com/ubiquibot/conversation-rewards/pull/12

gentlementlegen commented 2 months ago

Latest successful run: https://github.com/gentlementlegen/conversation-rewards/actions/runs/8813479887/job/24191308344#step:5:43

gentlementlegen commented 2 months ago

Apologies for the PR spam.

This aims to cover as much as possible with tests. It also solves many bugs encountered while testing, such as ignoring or including comments from pull requests that were not related, or on the contrary to ignore comments that should be part of the final result.

All the API is mocked, because if anyone would happen to add or delete a comment it would break all the tests. It also allows for fine grained testing for edge cases.

PR looks big again, but mostly contains mocked API results.

Last run: https://github.com/Meniole/test/issues/1#issuecomment-2077704327