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('@value red from "./colors.css";',':import("./colors.css") {\n i__const_red_0: red\n}')
30
+
it('should import and re-export a simple constant',()=>{
31
+
test('@value red from "./colors.css";',':export {\n red: i__const_red_0\n}\n:import("./colors.css") {\n i__const_red_0: red\n}')
32
32
})
33
33
34
34
it('should import a simple constant and replace usages',()=>{
35
-
test('@value red from "./colors.css"; .foo { color: red; }',':import("./colors.css") {\n i__const_red_1: red;\n}\n.foo { color: i__const_red_1; }')
35
+
test('@value red from "./colors.css"; .foo { color: red; }',':export {\n red: i__const_red_1;\n}\n:import("./colors.css") {\n i__const_red_1: red;\n}\n.foo { color: i__const_red_1; }')
36
36
})
37
37
38
38
it('should import and alias a constant and replace usages',()=>{
39
-
test('@value 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; }')
39
+
test('@value blue as red from "./colors.css"; .foo { color: red; }',':export {\n red: i__const_red_2;\n}\n:import("./colors.css") {\n i__const_red_2: blue;\n}\n.foo { color: i__const_red_2; }')
40
40
})
41
41
42
42
it('should import multiple from a single file',()=>{
43
43
test(
44
44
`@value blue, red from "./colors.css";
45
45
.foo { color: red; }
46
46
.bar { color: blue }`,
47
-
`:import("./colors.css") {
47
+
`:export {
48
+
blue: i__const_blue_3;
49
+
red: i__const_red_4;
50
+
}
51
+
:import("./colors.css") {
48
52
i__const_blue_3: blue;
49
53
i__const_red_4: red;
50
54
}
@@ -55,13 +59,17 @@ describe('constants', () => {
55
59
it('should import from a definition',()=>{
56
60
test(
57
61
'@value colors: "./colors.css"; @value red from colors;',
0 commit comments