test: confirm socket mode receiver acknowledges processed events#2520
test: confirm socket mode receiver acknowledges processed events#2520
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2520 +/- ##
==========================================
+ Coverage 92.97% 93.24% +0.26%
==========================================
Files 36 36
Lines 7443 7443
Branches 648 652 +4
==========================================
+ Hits 6920 6940 +20
+ Misses 518 498 -20
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
WilliamBergamin
left a comment
There was a problem hiding this comment.
Thanks for working on this these tests a very useful 💯
I'm just not sure this is the behavior we intend 🤔
WilliamBergamin
left a comment
There was a problem hiding this comment.
This looks good 💯
Some tricky mocking but I think I understand it feel free to merge
zimeg
left a comment
There was a problem hiding this comment.
@WilliamBergamin Thanks for improving the test cases to match expected behaviors 🙏 ✨
I will rest better knowing these paths are now covered.
| while (!defaultProcessEventErrorHandlerSpy.called) { | ||
| await delay(50); | ||
| } |
There was a problem hiding this comment.
🧠 This is a super good case to cover too! We can now be more confident in retries on erroring cases I believe.
Summary
This PR adds test for Socket Mode event processing to ensure the received event is acknowledged as expected:
bolt-js/src/receivers/SocketModeReceiver.ts
Lines 226 to 247 in ee8df73
Notes
ackbehaviors don't have unexpected change!Requirements