diff --git a/test/fixtures/multiple/input.css b/test/fixtures/multiple/input.css new file mode 100644 index 0000000..75fe803 --- /dev/null +++ b/test/fixtures/multiple/input.css @@ -0,0 +1,5 @@ +@custom-selector :--foo .foo; + +:--foo, :--foo.bar { + color: white; +} diff --git a/test/fixtures/multiple/output.css b/test/fixtures/multiple/output.css new file mode 100644 index 0000000..3da3e23 --- /dev/null +++ b/test/fixtures/multiple/output.css @@ -0,0 +1,3 @@ +.foo, .foo.bar { + color: white; +} diff --git a/test/fixtures/similar-matches/input.css b/test/fixtures/similar-matches/input.css index 2703673..afa9056 100644 --- a/test/fixtures/similar-matches/input.css +++ b/test/fixtures/similar-matches/input.css @@ -1,11 +1,11 @@ @custom-selector :--foo h1; -@custom-selector :--foo-bar-baz h4 h5 h6; +@custom-selector :--foo-bar-baz h4, h5, h6; :--foo { color: red; } -:--foo-bar-baz { +:--foo-bar-baz > span { color: blue; } diff --git a/test/fixtures/similar-matches/output.css b/test/fixtures/similar-matches/output.css index 2213e6b..f4b0f33 100644 --- a/test/fixtures/similar-matches/output.css +++ b/test/fixtures/similar-matches/output.css @@ -2,7 +2,7 @@ h1 { color: red; } -h4 h5 h6 { +h4 > span, h5 > span, h6 > span { color: blue; } diff --git a/test/index.js b/test/index.js index 15e6143..8b9a240 100644 --- a/test/index.js +++ b/test/index.js @@ -54,5 +54,7 @@ test("@custom-selector", function(t) { } }) + compareFixtures(t, "multiple", "Should transform multiple selectors") + t.end() })