From 2576931a2b3d0fb33219b6d98850633e7b558c66 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sat, 13 Jan 2024 02:09:42 +0100 Subject: [PATCH] Attempt to fix tests --- test/CodeQuality.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/CodeQuality.spec.ts b/test/CodeQuality.spec.ts index 719b9cca6..c3f6a8dfd 100644 --- a/test/CodeQuality.spec.ts +++ b/test/CodeQuality.spec.ts @@ -76,13 +76,14 @@ function _arrayBufferToBase64(buffer) { return btoa(binary) } +const cachedHashes: Record = {} + async function validateScriptIntegrityOf(path: string): Promise { const htmlContents = readFileSync(path, "utf8") const doc = parse_html(htmlContents) // @ts-ignore const scripts = Array.from(doc.getElementsByTagName("script")) // Maps source URL onto hash - const cachedHashes: Record = {} const failed = new Set() for (const script of scripts) { let src = script.getAttribute("src")