cal/packages/lib/testEmails.ts
Hariom Balhara f9eb335d0b
test: Integration tests for handleNewBooking (#11044)
Co-authored-by: Shivam Kalra <shivamkalra98@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
2023-09-06 12:23:53 -07:00

19 lines
406 B
TypeScript

declare global {
// eslint-disable-next-line no-var
var testEmails: {
to: string;
from: string;
subject: string;
html: string;
}[];
}
export const setTestEmail = (email: (typeof globalThis.testEmails)[number]) => {
globalThis.testEmails = globalThis.testEmails || [];
globalThis.testEmails.push(email);
};
export const getTestEmails = () => {
return globalThis.testEmails;
};