diff --git a/test/moduleMinimizeTestCases/custom-variables/expected.css b/test/moduleMinimizeTestCases/custom-variables/expected.css new file mode 100644 index 00000000..f975ee3f --- /dev/null +++ b/test/moduleMinimizeTestCases/custom-variables/expected.css @@ -0,0 +1 @@ +:root{--foo:1px;--bar:2px} \ No newline at end of file diff --git a/test/moduleMinimizeTestCases/custom-variables/source.css b/test/moduleMinimizeTestCases/custom-variables/source.css new file mode 100644 index 00000000..344f3d34 --- /dev/null +++ b/test/moduleMinimizeTestCases/custom-variables/source.css @@ -0,0 +1,4 @@ +:root { + --foo: 1px; + --bar: 2px; +} diff --git a/test/simpleTest.js b/test/simpleTest.js index 33636ccc..407b0310 100644 --- a/test/simpleTest.js +++ b/test/simpleTest.js @@ -38,6 +38,9 @@ describe("simple", function() { test("charset directive", "@charset \"UTF-8\";\n .class { a: b c d; }", [ [1, "@charset \"UTF-8\";\n .class { a: b c d; }", ""] ]); + test("custom variables", ":root {--foo: 1px;\n--bar: 2px;}", [ + [1, ":root {--foo: 1px;\n--bar: 2px;}", ""] + ]); testError("error formatting", ".some {\n invalid css;\n}", function(err) { assert.equal(err.message, [ 'Unknown word (2:2)',