yetibot / core

:expressionless: Core yetibot utilities, extracted for shared use among Yetibot and its various plugins
https://yetibot.com
Eclipse Public License 1.0
27 stars 17 forks source link

added tests for slack adapter #193

Closed gkspranger closed 3 years ago

gkspranger commented 3 years ago

soooo -- let's talk about this one .. i am not sure how you are going to feel about it because there is A LOT of london school of TDD (verify function X is called with params Y and Z) vs chicago school (function X returns Y) ..

i tried to find a nice balance and implement chicago school wherever i could -- but since a lot of these tests are on things that have real side causes/effects -- i felt like i had little choice but go to london ..

that said, i started down the road of refactoring AND adding tests -- but that felt dirty to me, since i don't like to touch things unless it has a test, or is very small change .. my follow up would be to add the refactors i have in mind, to ensure i am not breaking functionality ..

happy thursday !!

codecov[bot] commented 3 years ago

Codecov Report

Merging #193 (ff9fc28) into master (6c55a34) will increase coverage by 2.13%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #193      +/-   ##
==========================================
+ Coverage   54.34%   56.47%   +2.13%     
==========================================
  Files          94       94              
  Lines        4131     4131              
  Branches      209      221      +12     
==========================================
+ Hits         2245     2333      +88     
+ Misses       1677     1577     -100     
- Partials      209      221      +12     
Impacted Files Coverage Δ
src/yetibot/core/adapters/slack.clj 48.98% <0.00%> (+25.50%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6c55a34...ff9fc28. Read the comment docs.