/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/specs/cpu_prof/flamegraph/verify.js
35 строк
993 B
Copilot
fix: make flamegraph SVG fill full browser viewport (#32727)
19 мар 2026, 18:08
Не верифицирован
19 мар 2026, 18:08
8a5a704
Код
Авторство
О чём код?
const files = [...Deno.readDirSync(".")].filter((f) => f.name.endsWith(".svg")); if (files.length === 0) { console.log("No .svg files found"); Deno.exit(1); } const content = Deno.readTextFileSync(files[0].name); if (!content.includes("<svg")) { console.log("Missing SVG element"); Deno.exit(1); } if (!content.includes("CPU Flamegraph")) { console.log("Missing flamegraph title"); Deno.exit(1); } if (!content.includes('id="frames"')) { console.log("Missing frames container"); Deno.exit(1); } if (!content.includes("fg:x=")) { console.log("Missing frame data attributes"); Deno.exit(1); } if (!content.includes("function init(evt)")) { console.log("Missing interactive JavaScript"); Deno.exit(1); } if (!content.includes('height="100%"')) { console.log("SVG should use full viewport height"); Deno.exit(1); } if (!content.includes("fg:content_height=")) { console.log("Missing content height data attribute"); Deno.exit(1); } console.log("Valid flamegraph");