chore: remove debug trace logs (#2545)

This commit is contained in:
Marvin Hagemeister
2024-06-25 10:08:48 +02:00
committed by GitHub
parent 49839079a4
commit 0f6b4f624f
22 changed files with 150 additions and 8 deletions
+1
View File
@@ -27,4 +27,5 @@ const app = new App({ staticDir: "./static" }).get(
const handler = await app.handler();
const res = await handler(new Request("http://localhost/"));
// deno-lint-ignore no-console
console.log(await res.text());
+1
View File
@@ -3,6 +3,7 @@ import { DAY } from "@std/datetime";
// deno-lint-ignore require-await
async function getLatestVersion() {
// deno-lint-ignore no-console
console.log("fetching latest version");
return Deno.env.get("LATEST_VERSION") ?? "99.99.999";
}
+3
View File
@@ -244,6 +244,7 @@ export function parseHtml(input: string): TestDocument {
// deno-lint-ignore no-explicit-any
const doc = new DOMParser().parseFromString(input, "text/html") as any;
Object.defineProperty(doc, "debug", {
// deno-lint-ignore no-console
value: () => console.log(prettyDom(doc)),
enumerable: false,
});
@@ -284,6 +285,7 @@ export function assertMetaContent(
}
if (el === null) {
// deno-lint-ignore no-console
console.log(prettyDom(doc));
throw new Error(
`No <meta>-tag found with content "${expected}"`,
@@ -312,6 +314,7 @@ export async function waitForText(
// deno-lint-ignore no-explicit-any
const pretty = prettyDom(parseHtml(body) as any);
// deno-lint-ignore no-console
console.log(
`Text "${text}" not found on selector "${selector}" in html:\n\n${pretty}`,
);