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
feat: mailersend check integration function #1749
feat: mailersend check integration function #1749
Conversation
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.
Good clean implementation. Just few minor suggestions.
.mockImplementation(() => | ||
Promise.resolve({ | ||
ok: true, | ||
status: 200, | ||
}) |
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.
.mockImplementation(() => | |
Promise.resolve({ | |
ok: true, | |
status: 200, | |
}) | |
.mockImplementation(async () => ({ | |
ok: true, | |
status: 200, | |
}) |
Just to unify the style of the spies as the implemented ones in this file followed async/await syntax.
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.
Agree with you!
.mockImplementation(() => | ||
Promise.resolve({ | ||
ok: false, | ||
json: () => | ||
Promise.resolve({ | ||
message: serverMessage, | ||
}), | ||
status: 401, | ||
}) |
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.
Let's unify the style of the spies as the implemented ones in this file followed async/await syntax.
private createRecipients( | ||
recipients: IEmailOptions['to'] | ||
): Recipient[] | Recipient { |
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.
private createRecipients( | |
recipients: IEmailOptions['to'] | |
): Recipient[] | Recipient { | |
private createRecipients( | |
recipients: IEmailOptions['to'] | |
): Recipient[] { |
We are returning an array always.
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.
Wow, good you noticed it!
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.
🌟
What kind of change does this PR introduce?
feature: implemented
checkIntegration
for mailersendWhy was this change needed?
Resolves [NV-988] - Test MailerSend provider connection when creating/updating integration #1648
Other information: