Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e7baeb0

Browse files
test: css nesting (#42)
1 parent 5ccc046 commit e7baeb0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

‎test/index.test.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,30 @@ describe("constants", () => {
6262
":export {\n blue: red;\n}\n.foo { color: red; }"
6363
));
6464

65+
it("should replace constants within the file #1", () =>
66+
test(
67+
"@value blue: red; .foo { &.bar { color: blue; } }",
68+
":export {\n blue: red;\n} .foo { &.bar { color: red; } }"
69+
));
70+
71+
it("should replace constants within the file #2", () =>
72+
test(
73+
"@value blue: red; .foo { @media (min-width: 1024px) { &.bar { color: blue; } } }",
74+
":export {\n blue: red;\n} .foo { @media (min-width: 1024px) { &.bar { color: red; } } }"
75+
));
76+
77+
it("should replace constants within the file #3", () =>
78+
test(
79+
"@value blue: red; .foo { @media (min-width: 1024px) { &.bar { @media (min-width: 1024px) { color: blue; } } } }",
80+
":export {\n blue: red;\n} .foo { @media (min-width: 1024px) { &.bar { @media (min-width: 1024px) { color: red; } } } }"
81+
));
82+
83+
it("should replace constants within the file #4", () =>
84+
test(
85+
"@value test-t: 40px;\n@value test_q: 36px; .foo { height: test-t; height: test_q; }",
86+
":export {\n test-t: 40px;\n test_q: 36px;\n}\n.foo { height: 40px; height: 36px; }"
87+
));
88+
6589
it("should replace selectors within the file", () =>
6690
test(
6791
"@value colorValue: red; .colorValue { color: colorValue; }",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /