/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/hotCases/css/composes/index.js
21 строка
639 B
Alexander Akait
test: add missing CSS test cases inspired by css-loader and mini-css-extract-plugin (#20914)
05 май 2026, 20:57
Не верифицирован
05 май 2026, 20:57
959e210
Код
Авторство
О чём код?
import * as styles from "./style.module.css"; it("should HMR a CSS module that uses composes", (done) => { expect(styles).toMatchObject({ button: "style_module_css-button shared_module_css-shared" }); const links = window.document.getElementsByTagName("link"); expect(links[0].sheet.css).toContain("color: red;"); NEXT( require("../../update")(done, true, () => { const updatedLinks = window.document.getElementsByTagName("link"); expect(updatedLinks[0].sheet.css).toContain("color: green;"); expect(styles).toMatchObject({ button: "style_module_css-button shared_module_css-shared" }); done(); }) ); });