RITlug / teleirc

Go implementation of a Telegram <=> IRC bridge for use with any IRC channel and Telegram group
https://docs.teleirc.com/
GNU General Public License v3.0
141 stars 45 forks source link

Create unit tests for IRC action handler functionality #378

Open Tjzabel opened 3 years ago

Tjzabel commented 3 years ago

Summary

IRC messages can also contain actions (/me). We currently do not have unit tests for this functionality.

Background

Is your improvement related to a problem? Please describe:

Not related to a direct problem.

Describe the solution you'd like:

Unit testing needs to cover various ACTION commands to make sure everything works smoothly.

Describe alternatives you've considered:

No other alternatives.

Details

The girc library makes use of an isAction function to see if a given message contains an action (i.e. /me). We need to figure out the best way to mock an action and test for it.

Outcome

IRC actions are fully tested.