From b48fb2015ab634fb1447bd48a3147f852b7634dc Mon Sep 17 00:00:00 2001 From: Evilebot Tnawi Date: Wed, 24 Jan 2018 17:00:02 +0300 Subject: [PATCH] tests(css): variables (#3813) --- .../__snapshots__/jsfmt.spec.js.snap | 18 ++++++++++++++++++ tests/css_variables/jsfmt.spec.js | 1 + tests/css_variables/variables.css | 6 ++++++ 3 files changed, 25 insertions(+) create mode 100644 tests/css_variables/__snapshots__/jsfmt.spec.js.snap create mode 100644 tests/css_variables/jsfmt.spec.js create mode 100644 tests/css_variables/variables.css diff --git a/tests/css_variables/__snapshots__/jsfmt.spec.js.snap b/tests/css_variables/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000..81df37f6e --- /dev/null +++ b/tests/css_variables/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,18 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`variables.css 1`] = ` +.foo { + --prop: 10px; + prop1: var(--prop); + prop2: var(--my-var, --my-background, pink); + prop3: calc(var(--prop) * 1px); +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.foo { + --prop: 10px; + prop1: var(--prop); + prop2: var(--my-var, --my-background, pink); + prop3: calc(var(--prop) * 1px); +} + +`; diff --git a/tests/css_variables/jsfmt.spec.js b/tests/css_variables/jsfmt.spec.js new file mode 100644 index 000000000..7d3726c81 --- /dev/null +++ b/tests/css_variables/jsfmt.spec.js @@ -0,0 +1 @@ +run_spec(__dirname, ["css"]); diff --git a/tests/css_variables/variables.css b/tests/css_variables/variables.css new file mode 100644 index 000000000..6113caa18 --- /dev/null +++ b/tests/css_variables/variables.css @@ -0,0 +1,6 @@ +.foo { + --prop: 10px; + prop1: var(--prop); + prop2: var(--my-var, --my-background, pink); + prop3: calc(var(--prop) * 1px); +}