mirror of https://github.com/webpack/webpack.git
13 lines
391 B
JavaScript
13 lines
391 B
JavaScript
|
|
import * as style from "./style.css";
|
||
|
|
|
||
|
|
it("should compile and load style on demand", done => {
|
||
|
|
expect(style).toEqual(nsObj({}));
|
||
|
|
import("./style2.css").then(x => {
|
||
|
|
expect(x).toEqual(nsObj({}));
|
||
|
|
const style = getComputedStyle(document.body);
|
||
|
|
expect(style.getPropertyValue("background")).toBe(" red");
|
||
|
|
expect(style.getPropertyValue("color")).toBe(" green");
|
||
|
|
done();
|
||
|
|
}, done);
|
||
|
|
});
|