You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test('@import red from "./colors.css";',':import("./colors.css") {\n i__const_red_0: red\n}')
32
+
})
33
+
34
+
it('should import a simple constant and replace usages',()=>{
35
+
test('@import red from "./colors.css"; .foo { color: red; }',':import("./colors.css") {\n i__const_red_1: red;\n}\n.foo { color: i__const_red_1; }')
36
+
})
37
+
38
+
it('should import and alias a constant and replace usages',()=>{
39
+
test('@import blue as red from "./colors.css"; .foo { color: red; }',':import("./colors.css") {\n i__const_red_2: blue;\n}\n.foo { color: i__const_red_2; }')
40
+
})
41
+
42
+
it('should import multiple from a single file',()=>{
43
+
test(
44
+
`@import blue, red from "./colors.css";
45
+
.foo { color: red; }
46
+
.bar { color: blue }`,
47
+
`:import("./colors.css") {
48
+
i__const_blue_3: blue;
49
+
i__const_red_4: red;
50
+
}
51
+
.foo { color: i__const_red_4; }
52
+
.bar { color: i__const_blue_3 }`)
53
+
})
54
+
55
+
it('should import from a definition',()=>{
56
+
test(
57
+
'@define colors: "./colors.css"; @import red from colors;',
0 commit comments