Skip to content

Commit

Permalink
test(design): edit daff-map-get tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gracetxgao committed Dec 10, 2024
1 parent 417b041 commit 2628e1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libs/design/scss/core/map/map-get/map-get.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// @throws error
@function daff-map-get($map, $keys...) {
@each $key in $keys {
@if not map.has-key($map, $keys) {
@if not map.has-key($map, $key) {
@error 'The map doesn\'t contain the $key: `#{$key}`\'';
}
$map: map.get($map, $key);
Expand Down
10 changes: 5 additions & 5 deletions libs/design/scss/core/map/map-get/map-get.spec.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
);

@include it('returns the value of the nested key if it exists in the map') {
@include assert-equal(daff-map-get($map, nested, string), '1');
@include assert-equal(daff-map-get($map, nested, number), 2);
@include assert-equal(daff-map-get($map, nested, map), $nested-map);
@include assert-equal(daff-map-get($map, nested, map, string), '3');
@include assert-equal(daff-map-get($map, nested, map, number), 4);
@include assert-equal(daff-map-get($map, 'nested', 'string'), '1');
@include assert-equal(daff-map-get($map, 'nested', 'number'), 2);
@include assert-equal(daff-map-get($map, 'nested', 'map'), $nested-map);
@include assert-equal(daff-map-get($map, 'nested', 'map', 'string'), '3');
@include assert-equal(daff-map-get($map, 'nested', 'map', 'number'), 4);
}
}

0 comments on commit 2628e1a

Please sign in to comment.