webpack/test/configCases/css/no-extra-runtime-in-js/index.js

15 lines
331 B
JavaScript
Raw Normal View History

2024-10-12 20:22:36 +08:00
import "./style.css";
it("should compile", () => {
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();
expect(Object.keys(__webpack_modules__).length).toBe(3)
});