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

feat: mailersend check integration function #1749

Merged

Conversation

precious-void
Copy link
Contributor

Copy link
Contributor

@p-fernandez p-fernandez left a 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.

Comment on lines 91 to 95
.mockImplementation(() =>
Promise.resolve({
ok: true,
status: 200,
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with you!

Comment on lines 114 to 122
.mockImplementation(() =>
Promise.resolve({
ok: false,
json: () =>
Promise.resolve({
message: serverMessage,
}),
status: 401,
})
Copy link
Contributor

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.

Comment on lines 25 to 27
private createRecipients(
recipients: IEmailOptions['to']
): Recipient[] | Recipient {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private createRecipients(
recipients: IEmailOptions['to']
): Recipient[] | Recipient {
private createRecipients(
recipients: IEmailOptions['to']
): Recipient[] {

We are returning an array always.

Copy link
Contributor Author

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!

Copy link
Contributor

@p-fernandez p-fernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌟

@p-fernandez p-fernandez merged commit 9a0ff23 into novuhq:main Oct 19, 2022
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.

[NV-988] - Test MailerSend provider connection when creating/updating integration
2 participants