From 828a12ffac60b2fb7e6b0931f610b7ca9f53ffc2 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 22 Jun 2024 08:14:44 +0200 Subject: Props: Support recursive var() if referring to subtree --- test/_props.scss | 10 ++++++++++ test/test.js | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'test') 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 @@ @include assert-equal(props.get(--primary --text), var(--buttons--primary--text), 'Get via namespace "buttons" --primary --text'); @include assert-equal(props.get(--secondary --text, $default: false), var(--buttons--secondary--text, false), 'Get via namespace "buttons" --secondary --text with default'); } + @include assert-equal(props.get(--buttons), ( + --primary: ( + --background: var(--buttons--primary--background), + --text: var(--buttons--primary--text) + ), + --default: ( + --background: var(--buttons--default--background), + --text: var(--buttons--default--text) + ) + ), 'Get --buttons recursively'); @include assert-equal(props.clear(), null, 'Delete default tree'); } 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 @@ -const path = require("path"); +const path = require("path"); const sassTrue = require("sass-true"); -sassTrue.runSass({ file: path.join(__dirname, "test.scss") }, { describe, it }); +sassTrue.runSass({ describe, it }, path.join(__dirname, "test.scss")); -- cgit v1.2.3-54-g00ecf