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 issue choosing reply button expire #324
Conversation
…ctions (handleInput, handlePostback and processImage)
Remove handlePostback mock, use choosingArticle and choosingReply api fixture instead
@@ -70,10 +70,17 @@ export default async function({ data = {} }, event, userId) { | |||
|
|||
// choose for user | |||
event = { | |||
type: 'postback', | |||
type: 'server_choose', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: what would happen if we just use 'postback'
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No functional difference.
I use server_choose
just to sperate two different flow : "user choose" and "server choose for user".
Even though the function under test does not import MongoDB client, its dependency may do. Therefore we just close DB connection for each test suite by adding DB closing logic in setup-jest.
Pull Request Test Coverage Report for Build 3095429439
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the fix 🙏
Fix #323
Directly call the specific handler function when choosing article/reply for user