aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2024-06-22 08:14:44 +0200
committerVolpeon <git@volpeon.ink>2024-06-22 08:14:44 +0200
commit828a12ffac60b2fb7e6b0931f610b7ca9f53ffc2 (patch)
tree3572fbd90d4e6c98f986b90f18681b13f49b598b /test
parentUpdate (diff)
downloadiro-sass-828a12ffac60b2fb7e6b0931f610b7ca9f53ffc2.tar.gz
iro-sass-828a12ffac60b2fb7e6b0931f610b7ca9f53ffc2.tar.bz2
iro-sass-828a12ffac60b2fb7e6b0931f610b7ca9f53ffc2.zip
Props: Support recursive var() if referring to subtree
Diffstat (limited to 'test')
-rw-r--r--test/_props.scss10
-rw-r--r--test/test.js4
2 files changed, 12 insertions, 2 deletions
diff --git a/test/_props.scss b/test/_props.scss
index d8b550b..1d64080 100644
--- a/test/_props.scss
+++ b/test/_props.scss
@@ -240,6 +240,16 @@
240 @include assert-equal(props.get(--primary --text), var(--buttons--primary--text), 'Get via namespace "buttons" --primary --text'); 240 @include assert-equal(props.get(--primary --text), var(--buttons--primary--text), 'Get via namespace "buttons" --primary --text');
241 @include assert-equal(props.get(--secondary --text, $default: false), var(--buttons--secondary--text, false), 'Get via namespace "buttons" --secondary --text with default'); 241 @include assert-equal(props.get(--secondary --text, $default: false), var(--buttons--secondary--text, false), 'Get via namespace "buttons" --secondary --text with default');
242 } 242 }
243 @include assert-equal(props.get(--buttons), (
244 --primary: (
245 --background: var(--buttons--primary--background),
246 --text: var(--buttons--primary--text)
247 ),
248 --default: (
249 --background: var(--buttons--default--background),
250 --text: var(--buttons--default--text)
251 )
252 ), 'Get --buttons recursively');
243 253
244 @include assert-equal(props.clear(), null, 'Delete default tree'); 254 @include assert-equal(props.clear(), null, 'Delete default tree');
245 } 255 }
diff --git a/test/test.js b/test/test.js
index 94d16da..cce331c 100644
--- a/test/test.js
+++ b/test/test.js
@@ -1,4 +1,4 @@
1const path = require("path"); 1const path = require("path");
2const sassTrue = require("sass-true"); 2const sassTrue = require("sass-true");
3 3
4sassTrue.runSass({ file: path.join(__dirname, "test.scss") }, { describe, it }); 4sassTrue.runSass({ describe, it }, path.join(__dirname, "test.scss"));