/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/css/namespace/index.js
26 строк
803 B
Alexander Akait
fix(css): leave @namespace URIs alone (#21658)
10 авг 2026, 12:13
Не верифицирован
10 авг 2026, 12:13
829fc32
Код
Авторство
О чём код?
import "./style.css"; import * as scoped from "./style.module.css"; const fs = __non_webpack_require__("fs"); const path = __non_webpack_require__("path"); it("should compile with warning", done => { const style = getComputedStyle(document.body); expect(style.getPropertyValue("background")).toBe(" red"); done(); }); it("should scope a module that also declares a namespace", () => { expect(scoped.local).toBe("_local"); }); it("should emit the namespace URIs unchanged", () => { expect( fs.readFileSync(path.join(__dirname, "bundle0.css"), "utf-8") ).toMatchSnapshot(); }); it("should not emit an asset for a namespace URI", () => { // A namespace URI is an opaque identifier, not a request for a file. expect(fs.readdirSync(__dirname).filter(f => f.endsWith(".svg"))).toEqual([]); });