/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/html/link/index.js
20 строк
504 B
Raj Aryan
test(html): add missing edge-case and webpackIgnore tests for html-loader parity (#21078)
03 июн 2026, 20:16
Не верифицирован
03 июн 2026, 20:16
4e39088
Код
Авторство
О чём код?
import page from "./page.html"; import "./style.css"; import "./alt-style.css"; it("should handle link tag", () => { expect(page).toMatchSnapshot(); // webpackIgnore leaves the stylesheet link untouched. expect(page).toContain('<link rel="stylesheet" href="./ignored.css">'); const links = document.getElementsByTagName("link"); const css = []; // Skip first because import it by default for (const link of links.slice(1)) { css.push(link.sheet.css); } expect(css).toMatchSnapshot(); });