Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Reaction event handler #47

Merged
merged 13 commits into from
Jul 11, 2023
Merged

Conversation

Leonelmarianog
Copy link
Collaborator

Summary

Refactors reaction event handler because the code was chaotic and hard to follow. This change should make the code cleaner and easier to understand.

Details

  • Renames reaction event handler to "handleRobotFaceReaction".
  • Moves reaction event handlers to their own folder event/reaction.
  • Updates and organizes tests because previous tests were hard to follow.

@Leonelmarianog Leonelmarianog changed the title refactor: Refactor reaction event handler refactor: Reaction event handler Jul 11, 2023
@github-actions
Copy link

LCOV of commit 6a080d5 during CI workflow #24

Summary coverage rate:
  lines......: 96.3% (602 of 625 lines)
  functions..: 98.1% (102 of 104 functions)
  branches...: 85.1% (149 of 175 branches)

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  src/config/env.config.ts                                                 | 100%      4|    -     0|    -      0
  src/events/index.ts                                                      | 100%      7| 100%     1|    -      0
  src/events/reaction/__test__/fixture/robotFaceReactionEvent.ts           | 100%      2|    -     0|    -      0
  src/events/reaction/__test__/fixture/webclient.ts                        | 100%      6|    -     0|    -      0
  src/events/reaction/handleRobotFaceReaction.ts                           |98.3%     59| 100%     2|94.4%     18
  src/events/reaction/index.ts                                             | 100%      4| 100%     1|    -      0

@Leonelmarianog Leonelmarianog merged commit dc14e0c into main Jul 11, 2023
2 checks passed
@Leonelmarianog Leonelmarianog deleted the refactor/message-reaction branch July 11, 2023 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant