From 4c9a427806b47b916849dbc98330fdbb469b659b Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 7 Feb 2022 12:28:59 +0100 Subject: Replace deep map functions with built-ins --- test/_functions.scss | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) (limited to 'test/_functions.scss') diff --git a/test/_functions.scss b/test/_functions.scss index 2430f28..07561ef 100644 --- a/test/_functions.scss +++ b/test/_functions.scss @@ -41,55 +41,6 @@ @include assert-equal(functions.map-get-default($map, 'index', 'nothing'), 'nothing', 'Get missing value'); } - @include it('map-get-deep') { - $map: ( - 'key': 'value', - 'sub': ( - 'item1': 1, - 'item2': 2, - 'subsub': ( - 'item1': 11, - 'item2': 12, - ) - ) - ); - - @include assert-equal(functions.map-get-deep($map, 'key'), map-get($map, 'key'), 'Get value in root level'); - @include assert-equal(functions.map-get-deep($map, 'sub' 'item1'), map-get(map-get($map, 'sub'), 'item1'), 'Get value in first level'); - @include assert-equal(functions.map-get-deep($map, 'sub' 'item2'), map-get(map-get($map, 'sub'), 'item2'), 'Get value in first level'); - @include assert-equal(functions.map-get-deep($map, 'sub' 'subsub' 'item1'), map-get(map-get(map-get($map, 'sub'), 'subsub'), 'item1'), 'Get value in second level'); - @include assert-equal(functions.map-get-deep($map, 'sub' 'subsub' 'item2'), map-get(map-get(map-get($map, 'sub'), 'subsub'), 'item2'), 'Get value in second level'); - } - - @include it('map-merge-recursive') { - $map1: ( - 'key': 'value', - 'sub': ( - 'item1': 1, - 'item3': 2 - ) - ); - $map2: ( - 'another': 'item', - 'sub': ( - 'item1': 0, - 'item2': 1 - ) - ); - - $expected: ( - 'key': 'value', - 'another': 'item', - 'sub': ( - 'item1': 0, - 'item2': 1, - 'item3': 2 - ) - ); - - @include assert-equal(functions.map-merge-recursive($map1, $map2), $expected); - } - @include it('strip-unit') { @include assert-true(unitless(functions.strip-unit(1em)), 'Remove unit from 1em'); @include assert-true(unitless(functions.strip-unit(2rem)), 'Remove unit from 2rem'); -- cgit v1.2.3-54-g00ecf