forked from MapComplete/MapComplete
Attempt to fix tests
This commit is contained in:
parent
e7cecc26d9
commit
2576931a2b
1 changed files with 2 additions and 1 deletions
|
@ -76,13 +76,14 @@ function _arrayBufferToBase64(buffer) {
|
||||||
return btoa(binary)
|
return btoa(binary)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const cachedHashes: Record<string, string> = {}
|
||||||
|
|
||||||
async function validateScriptIntegrityOf(path: string): Promise<void> {
|
async function validateScriptIntegrityOf(path: string): Promise<void> {
|
||||||
const htmlContents = readFileSync(path, "utf8")
|
const htmlContents = readFileSync(path, "utf8")
|
||||||
const doc = parse_html(htmlContents)
|
const doc = parse_html(htmlContents)
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const scripts = Array.from(doc.getElementsByTagName("script"))
|
const scripts = Array.from(doc.getElementsByTagName("script"))
|
||||||
// Maps source URL onto hash
|
// Maps source URL onto hash
|
||||||
const cachedHashes: Record<string, string> = {}
|
|
||||||
const failed = new Set<string>()
|
const failed = new Set<string>()
|
||||||
for (const script of scripts) {
|
for (const script of scripts) {
|
||||||
let src = script.getAttribute("src")
|
let src = script.getAttribute("src")
|
||||||
|
|
Loading…
Reference in a new issue