Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jshawl committed Mar 27, 2024
1 parent d68952f commit da9b732
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('mail', () => {
global.fetch = vi.fn();
});
it('makes a request to the sendgrid api', async () => {
global.fetch.mockResolvedValueOnce({ json: () => '{}' });
global.fetch.mockResolvedValue({ json: () => '{}' });
await mail(input);
expect(global.fetch).toHaveBeenCalledWith(
'https://api.sendgrid.com/v3/mail/send',
Expand All @@ -46,7 +46,7 @@ describe('mail', () => {
);
});
it('logs', async () => {
global.fetch.mockResolvedValueOnce({ json: () => '{}', status: 200 });
global.fetch.mockResolvedValue({ json: () => '{}', status: 200 });
await mail({ ...input, to: '[email protected],[email protected]' });
expect(global.fetch).toHaveBeenCalledWith(
'https://api.logsnag.com/v1/log',
Expand Down

0 comments on commit da9b732

Please sign in to comment.