Skip to content

Commit

Permalink
Adds failing tests
Browse files Browse the repository at this point in the history
- tidy-var(columns)
- tidy-var() as a tidy-function argument
  • Loading branch information
goodguyry committed Apr 1, 2019
1 parent ff89fe5 commit 513132d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/tidy-var.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ describe('The `tidy-var()` function is replaced with the expected option value',
),
);

test(
'Replaces `tidy-var` when used as a `tidy-*` property value',
() => run(
'div { tidy-span: tidy-var(12); }',
'div { width: calc((((100vw - 0.625rem * 2) / 12 - 1.1458rem) * 12) + 1.25rem * 11); }',
typicalWithBreakpoints,
),
);

test(
'Replaces the correct value from within a matched breakpoint',
() => run(
Expand Down Expand Up @@ -79,6 +88,14 @@ describe('Matches tidy-var() functions', () => {
'tidy-var(siteMax)',
['tidy-var(siteMax)', 'siteMax'],
],
[
'tidy-var(columns)',
['tidy-var(columns)', 'columns'],
],
[
'tidy-span(tidy-var(columns))',
['tidy-var(columns)', 'columns'],
],
])(
'Matches %s',
(input, expected) => {
Expand Down

0 comments on commit 513132d

Please sign in to comment.