// 실적 — 수동 입력(static/performance.js) · 열 순서 · 설정 토글 — jsdom. // python tests/js/render_performance.py && NODE_PATH= node tests/js/perf_manual.test.js const fs = require("fs"), path = require("path"); const { JSDOM } = require("jsdom"); const OUT = path.join(__dirname, ".out"); const JS = fs.readFileSync(path.join(__dirname, "..", "..", "app", "static", "performance.js"), "utf8"); const fails = []; function check(name, cond, extra) { if (cond) console.log("PASS " + name); else { console.log("FAIL " + name + (extra !== undefined ? " → " + JSON.stringify(extra) : "")); fails.push(name); } } const settle = function () { return new Promise(function (r) { let i = 0; (function s() { if (i++ > 40) return r(); setImmediate(s); })(); }); }; const wait = function (ms) { return new Promise(function (r) { setTimeout(r, ms); }); }; async function env(file) { const html = fs.readFileSync(path.join(OUT, file), "utf8").replace(/