Skip to content

Commit

Permalink
Fix: Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexappleget committed Oct 10, 2024
1 parent 6a58f10 commit 8e3148a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ describe('SendEmailNotification', () => {
const content = 'Test';
const sendEmailUsers = ['123456', '12345', '1234'];
const subject = 'This is a test';
const testBCC = ['1234566789', '12352', '1231232'];

(sendEmailNotifications as jest.Mock).mockImplementation(async ({content, sendEmailUsers, subject, testBCC}) => {
await (messaging.createEmail as jest.Mock)('1234567890', subject, content, [], sendEmailUsers, [], [], testBCC);
await (messaging.createEmail as jest.Mock)('1234567890', subject, content, [], sendEmailUsers, [], [], []);
})

await sendEmailNotifications({content, sendEmailUsers, subject, testBCC});
await sendEmailNotifications({content, sendEmailUsers, subject});

expect(messaging.createEmail).toHaveBeenCalledWith(
expect.any(String),
Expand All @@ -33,7 +32,7 @@ describe('SendEmailNotification', () => {
sendEmailUsers,
[],
[],
testBCC,
[],
);
});
});
1 change: 0 additions & 1 deletion app/(admin)/admin/notifications/page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ describe('Admin notifications page', () => {
content: 'Test message section.',
sendEmailUsers: dummyParticipants,
subject: 'Test Title',
testBCC: expect.any(Array),
});
});
});
Expand Down

0 comments on commit 8e3148a

Please sign in to comment.