Skip to content

Commit 82b157d

Browse files
committed
Merge pull request csstools#26 from Semigradsky/tests
Updated tests
2 parents d4a9e2d + ee42cbb commit 82b157d

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

test/fixtures/multiple/input.css

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@custom-selector :--foo .foo;
2+
3+
:--foo, :--foo.bar {
4+
color: white;
5+
}

test/fixtures/multiple/output.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.foo, .foo.bar {
2+
color: white;
3+
}

test/fixtures/similar-matches/input.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
@custom-selector :--foo h1;
2-
@custom-selector :--foo-bar-baz h4 h5 h6;
2+
@custom-selector :--foo-bar-baz h4, h5, h6;
33

44
:--foo {
55
color: red;
66
}
77

8-
:--foo-bar-baz {
8+
:--foo-bar-baz > span {
99
color: blue;
1010
}
1111

test/fixtures/similar-matches/output.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ h1 {
22
color: red;
33
}
44

5-
h4 h5 h6 {
5+
h4 > span, h5 > span, h6 > span {
66
color: blue;
77
}
88

test/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,7 @@ test("@custom-selector", function(t) {
5454
}
5555
})
5656

57+
compareFixtures(t, "multiple", "Should transform multiple selectors")
58+
5759
t.end()
5860
})

0 commit comments

Comments
 (0)