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

Fix conversation context (and add tests) #187

Merged
merged 8 commits into from
May 13, 2019

Conversation

aoberoi
Copy link
Contributor

@aoberoi aoberoi commented May 11, 2019

Summary

This change fixes an issue where events that did not have a conversation context would get "stuck" instead of flowing through the middleware and listeners.

But more significantly, this change provides an implementation of unit testing middleware. This pattern have be used to test other middleware as well. This involved pulling common test helpers out of the *.spec.ts files, and placing them into test-helpers.ts.

Fixes #185

Requirements (place an x in each [ ])

@codecov
Copy link

codecov bot commented May 11, 2019

Codecov Report

Merging #187 into master will increase coverage by 4.53%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #187      +/-   ##
==========================================
+ Coverage   54.42%   58.95%   +4.53%     
==========================================
  Files           7        7              
  Lines         441      441              
  Branches      120      120              
==========================================
+ Hits          240      260      +20     
+ Misses        193      173      -20     
  Partials        8        8
Impacted Files Coverage Δ
src/helpers.ts 100% <ø> (+5%) ⬆️
src/ExpressReceiver.ts 31.39% <ø> (ø) ⬆️
src/conversation-store.ts 100% <100%> (+76%) ⬆️

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 3080b5f...10263e2. Read the comment docs.

@aoberoi aoberoi requested a review from shaydewael May 13, 2019 18:10
@aoberoi aoberoi merged commit e390eaa into slackapi:master May 13, 2019
@aoberoi aoberoi deleted the test-conversation-store branch May 13, 2019 22:17
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.

Events get stuck when no conversation context is found
2 participants