/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/hotCases/universal/css/index.js
21 строка
501 B
Alexander Akait
Add HMR test suite for universal (node + web) targets (#21193)
16 июн 2026, 19:24
Не верифицирован
16 июн 2026, 19:24
b6d570d
Код
Авторство
О чём код?
import * as styles from "./style.css"; import update from "../../update.esm.js"; import.meta.webpackHot.accept(["./style.css"]); it("should update CSS module locals in a universal target", (done) => { expect(typeof styles.foo).toBe("string"); const initial = styles.foo; NEXT( update(done, true, () => { import("./style.css") .then((updated) => { expect(typeof updated.foo).toBe("string"); expect(updated.foo).toBe(initial); done(); }) .catch(done); }) ); });