Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mirisuzanne committed Jul 19, 2022
1 parent cb8ddb6 commit 1be3568
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Accoutrement Changelog

## UNRELEASED

- INTERNAL:
Expand Down
48 changes: 39 additions & 9 deletions test/tokens/_parse.scss
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,19 @@ $scale: function.get('color.scale');
$map: (
simple: 'hello world',
spacers: (
'sm': '#spacers->md' ('-': 1em),
'sm': '#spacers->md'
(
'-': 1em,
),
'md': 2em,
'lg': '#spacers->md' ('+': 1em),
'xl': '#spacers->lg' ('+': 1em),
'lg': '#spacers->md'
(
'+': 1em,
),
'xl': '#spacers->lg'
(
'+': 1em,
),
),
a: (
b: (
Expand All @@ -306,7 +315,30 @@ $scale: function.get('color.scale');
worse: '#bad',
h: 'hello',
w: 'world',
margin: (1em ('+': '#spacers->sm')) (1em ('+': '#spacers->md')) (1em ('+': '#spacers->lg')) (1em ('+': '#spacers->xl'))
margin: (
1em
(
'+': '#spacers->sm',
),
)
(
1em
(
'+': '#spacers->md',
),
)
(
1em
(
'+': '#spacers->lg',
),
)
(
1em
(
'+': '#spacers->xl',
),
),
);

@include it('Has no impact on a token without references') {
Expand Down Expand Up @@ -429,15 +461,13 @@ $scale: function.get('color.scale');
color.scale(color.mix(mediumvioletred, $shadow, 20%), $alpha: 50%)
);
}

@include it('Can perform multiple functional adjustments in one token') {
@include assert-equal(
parse.compile-token(
$map,
(1em ('+': '#spacers->sm'))
(1em ('+': '#spacers->md'))
(1em ('+': '#spacers->lg'))
(1em ('+': '#spacers->xl'))
(1em ('+': '#spacers->sm')) (1em ('+': '#spacers->md'))
(1em ('+': '#spacers->lg')) (1em ('+': '#spacers->xl'))
),
2em 3em 4em 5em
);
Expand Down

0 comments on commit 1be3568

Please sign in to comment.