tests: the rtdn email fixture keeps the user-data line out of the service-account comment's window

This commit is contained in:
CRTkafa 2026-10-15 22:51:31 +08:00
parent a1647e9552
commit 728b216dcc

View file

@ -396,9 +396,9 @@ describe('monorepo: username accounts without email, plugins in apps/native/node
for (const s of yes) expect({ s, hit: SIGNALS.email.test(s) }).toEqual({ s, hit: true });
for (const s of no) expect({ s, hit: SIGNALS.email.test(s) }).toEqual({ s, hit: false });
// multi-line: the identity is named in the doc comment above (a game apps/server/src/iap/rtdn.ts)
const rtdn = 'export interface RtdnAuthConfig {\n /** OIDC audience of the push subscription. */\n audience: string | null;\n /** Push service account email the token must carry. */\n email: string | null;\n}\nconst body = { email: form.email };';
const rtdn = 'export interface RtdnAuthConfig {\n /** OIDC audience of the push subscription. */\n audience: string | null;\n /** Push service account email the token must carry. */\n email: string | null;\n}\n\nexport async function signUp(form: Form) {\n // the sign-up request\n const body = { email: form.email };';
const src = [{ path: 'rtdn.ts', text: rtdn }];
expect(userFacing(src, [{ file: 'rtdn.ts', line: 5 }, { file: 'rtdn.ts', line: 7 }]).map(h => h.line)).toEqual([7]);
expect(userFacing(src, [{ file: 'rtdn.ts', line: 5 }, { file: 'rtdn.ts', line: 10 }]).map(h => h.line)).toEqual([10]);
});
test('built output is low trust', () => {
expect(isBuilt('apps/native/web/bundle/routes-AbC12345.js')).toBe(true);