From 71a6f48f7db199a4cc530787275fc37985bcaad4 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Wed, 2 May 2018 16:00:09 +0300 Subject: [PATCH] tests: css custom variables --- test/moduleMinimizeTestCases/custom-variables/expected.css | 1 + test/moduleMinimizeTestCases/custom-variables/source.css | 4 ++++ test/simpleTest.js | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 test/moduleMinimizeTestCases/custom-variables/expected.css create mode 100644 test/moduleMinimizeTestCases/custom-variables/source.css 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)',