/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/html/parser-sources-disable/index.js
12 строк
470 B
Alexander Akait
Experimental HTML: parser/generator options, compilation hooks, and fixes (#21441)
19 июл 2026, 23:58
Не верифицирован
19 июл 2026, 23:58
cb904da
Код
Авторство
О чём код?
const page = require("./page.html"); it("should leave a disabled built-in source untouched (`type: false`)", () => { // The built-in `<img src>` source was disabled, so its URL is not rewritten. expect(page).toContain('src="./hero.png"'); }); it("should still apply the other sources", () => { // The added `data-src` source is rewritten to the emitted asset. expect(page).not.toContain('data-src="./hero.png"'); expect(page).toMatch(/data-src="hero\.png"/); });