tests: de-flake tests and re-enable sanitizers (#1786)

This commit is contained in:
Luca Casonato
2023-09-18 11:09:24 +02:00
committed by GitHub
parent c2a82e723e
commit 795836ed29
14 changed files with 89 additions and 185 deletions
+5 -7
View File
@@ -5,9 +5,7 @@ import VERSIONS from "../versions.json" assert { type: "json" };
const dir = dirname(import.meta.url);
Deno.test("CORS should not set on GET /fresh-badge.svg", {
sanitizeResources: false,
}, async () => {
Deno.test("CORS should not set on GET /fresh-badge.svg", async () => {
const { serverProcess, lines, address } = await startFreshServer({
args: ["run", "-A", join(dir, "./main.ts")],
});
@@ -17,14 +15,14 @@ Deno.test("CORS should not set on GET /fresh-badge.svg", {
assertEquals(res.headers.get("cross-origin-resource-policy"), null);
await lines.cancel();
serverProcess.kill("SIGTERM");
await serverProcess.status;
// Drain the lines stream
for await (const _ of lines) { /* noop */ }
});
Deno.test("shows version selector", {
sanitizeResources: false,
}, async () => {
Deno.test("shows version selector", async () => {
await withPageName(join(dir, "./main.ts"), async (page, address) => {
await page.goto(`${address}/docs`);
await page.waitForSelector("#version");