Skip to content

Commit 7ec8154

Browse files
committed
chore(email-renderer): Flatten types for renderer and fix some tests
- The types on fxa-email-renderer render functions make them difficult to use in auth-server - And there was some cleanup to do from the first integration with email-sender to auth-server - Flattens the types on fxa-email-renderer functions - Updates snapshot tests (even though they're still skipped) - Updates the fxa-mailer to use the flattened type - Fixes first libs email sender test to use deepEquals assert on params passed to mailer - Adds a formatGeoData to convert app request geo location data to format expected by library Closes: FXA-12885
1 parent 745da87 commit 7ec8154

File tree

11 files changed

+900
-1158
lines changed

11 files changed

+900
-1158
lines changed

libs/accounts/email-renderer/src/index.spec.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,14 @@ import { FxaEmailRenderer } from './renderer';
88
describe('emails', () => {
99
it('can render email', async () => {
1010
const r = new FxaEmailRenderer(new NodeRendererBindings());
11-
const email = await r.renderAdminResetAccounts(
12-
{
13-
status: [{ locator: 'foo@mozilla.com', status: 'Success' }],
14-
},
15-
{
16-
logoAltText: 'mock-logo-alt-text',
17-
logoUrl: 'https://mozilla.org/mock-logo-url',
18-
logoWidth: '100px',
19-
privacyUrl: 'https://mozilla.org/mock-privacy-url',
20-
sync: false,
21-
}
22-
);
11+
const email = await r.renderAdminResetAccounts({
12+
status: [{ locator: 'foo@mozilla.com', status: 'Success' }],
13+
logoAltText: 'mock-logo-alt-text',
14+
logoUrl: 'https://mozilla.org/mock-logo-url',
15+
logoWidth: '100px',
16+
privacyUrl: 'https://mozilla.org/mock-privacy-url',
17+
sync: false,
18+
});
2319

2420
expect(email).toBeDefined();
2521

libs/accounts/email-renderer/src/partials/userInfo/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ export type TemplateData = UserDeviceTemplateData &
1111
primaryEmail?: string;
1212
date?: string;
1313
time?: string;
14-
//acceptLanguage: string;
1514
};

0 commit comments

Comments
 (0)