/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/specs/bundle/html/multiple-scripts-bundle.asserts.ts
25 строк
529 B
Nathan Whitaker
feat(bundle): support html entrypoint (#29856)
09 сен 2025, 22:18
Не верифицирован
09 сен 2025, 22:18
4e4bbf2
Код
Авторство
О чём код?
import { assertFileContains } from "./assert-helpers.ts"; let jsFile: string | undefined; Deno.readDirSync("./dist").forEach((entry) => { if (entry.name.endsWith(".js")) { jsFile = "./dist/" + entry.name; } }); if (!jsFile) { throw new Error("No .js file found"); } assertFileContains( "./dist/multiple-scripts.html", /src="\.\/multiple-scripts-[^\.]+\.js"/, ); assertFileContains( jsFile, 'insertAdjacentHTML("beforeend", "A")', ); assertFileContains( jsFile, 'insertAdjacentHTML("beforeend", "B")', );