/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/css/link-insert-hook/index.js
11 строк
472 B
Alexander Akait
feat: add linkInsert hook to CssLoadingRuntimeModule (#20947)
12 май 2026, 16:39
Не верифицирован
12 май 2026, 16:39
0053c9f
Код
Авторство
О чём код?
it("should call the linkInsert hook to control where the link is inserted", async () => { await import("./style.css"); const links = [...document.getElementsByTagName("link")]; const styleLink = links.find((link) => /style_css/.test(link.href)); expect(styleLink).toBeDefined(); expect(styleLink.getAttribute("data-link-insert")).toBe("custom"); // hook redirected insertion away from <head> and into <body>. expect(styleLink.parentNode).toBe(document.body); });