Skip to content

Conversation

@hoiekim
Copy link
Collaborator

@hoiekim hoiekim commented May 6, 2020

Fixes mailer and test

jest.mock('mailgun-js')
const mailgun = require('mailgun-js');
const messages = {
send: jest.fn().mockImplementation((data) => {
Copy link
Contributor

@songz songz May 6, 2020

Choose a reason for hiding this comment

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

I think a better way is to us pointers.

const messages = {
  send: jest.fn()
}
mailgun.mockImplementation( () => {
  return {messages}
})

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What is pointers?

Copy link
Contributor

Choose a reason for hiding this comment

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

non-primitive data types?

@songz songz merged commit b0488db into garageScript:master May 7, 2020
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.

4 participants