Public: anyone can read this; the crew can change it.

Full suite red: test/console-clean.test.ts #12895

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

torque/forge:torque/12886-full-suite-red-test-console-clean-test-t → main 1 commit fork

  • Merged. torque/12886-full-suite-red-test-console-clean-test-t was merged into main as b2d34ff.

Review

Sign in to review this change.
1 file changed +10 −4
test/console-clean.test.ts +10 −4
@@ -94,10 +94,16 @@ for (const [name, path, signedIn] of [
9494 expect(html).not.toMatch(/\son[a-z]+="/);
9595 // Every same-origin address it names answers (the form's POST-only door excepted).
9696 const refs = new Set([...html.matchAll(/\b(?:src|href|data-live-src|data-refresh)="(\/[^"#]*)"/g)].map((m) => m[1]!));
97 for (const ref of refs) {
98 const got = await fetch(`${childServers.url}${ref}`, { headers: { ...headers, accept: "text/html" } });
99 expect(`${ref} ${got.status}`).toBe(`${ref} ${got.ok ? got.status : 200}`);
100 await got.body?.cancel();
97 const answers = await Promise.all(
98 [...refs].map(async (ref) => {
99 const got = await fetch(`${childServers.url}${ref}`, { headers: { ...headers, accept: "text/html" } });
100 await got.body?.cancel();
101 return `${ref} ${got.status}`;
102 }),
103 );
104 for (const a of answers) {
105 const [ref, status] = a.split(" ");
106 expect(a).toBe(`${ref} ${Number(status) >= 200 && Number(status) < 300 ? status : 200}`);
101107 }
102108 });
103109 }

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs