/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/html/html-entry-point/test.js
14 строк
568 B
Alexander Akait
feat(html): add `module.generator.html.extract` option (#20979)
19 май 2026, 22:41
Не верифицирован
19 май 2026, 22:41
45a1bab
Код
Авторство
О чём код?
const fs = require("fs"); const path = require("path"); const readFile = (name) => fs.readFileSync(path.resolve(__dirname, name), "utf-8"); it("should emit page.html for an HTML entry without explicit extract: true", () => { const extracted = readFile("page.html"); expect(extracted).toMatchSnapshot(); expect(extracted).not.toContain('src="./script.js"'); expect(extracted).not.toContain('src="./image.png"'); expect(extracted).toMatch(/<script src="__html_[a-f0-9]+_0\.chunk\.js">/); expect(extracted).toMatch(/<img src="[a-f0-9]+\.png" alt="image">/); });