import assert from "node:assert/strict"; import crypto from "node:crypto"; import fs from "node:fs"; import path from "node:path"; import { execFileSync } from "node:child_process"; import { fileURLToPath } from "node:url"; const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../.."); const abs = (file) => path.join(root, file); const read = (file) => fs.readFileSync(abs(file), "utf8"); const json = (file) => JSON.parse(read(file)); const sha = (file) => crypto.createHash("sha256").update(fs.readFileSync(abs(file))).digest("hex"); const writeJson = (file, value) => { fs.mkdirSync(path.dirname(abs(file)), { recursive: true }); fs.writeFileSync(abs(file), `${JSON.stringify(value, null, 2)}\n`); }; const parentPath = "tests/golden/WBV2-P25-007/manifest.json"; const parent = json(parentPath); assert.equal(parent.status, "done"); assert.equal(parent.nextTask, "WBV2-P25-008"); assert.ok(fs.existsSync(abs("web/dist/index.html"))); assert.ok(fs.existsSync(abs("web/dist/assets/web-engine.worker-RtVT2Ln5.js"))); assert.ok(fs.existsSync(abs("web/dist/assets/web_engine-tuhS8OZi.wasm"))); assert.match(read("web/dist/index.html"), /