Skip to content

Commit 11ae22d

Browse files
committedApr 5, 2017
test(test): add test for #153
1 parent d1d3800 commit 11ae22d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎test/test.js

+9
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ test('it without variables', t => {
5454
t.is(processing(value), expected);
5555
});
5656

57+
test('chould change from options variables', t => {
58+
const expected = '@if green { .text-green { color: var(--green) }}';
59+
const value = '@if var(--green) { .text-green { color: var(--green) }}';
60+
const variables = {
61+
'--green': 'green'
62+
};
63+
t.is(processing(value, {variables: variables}), expected);
64+
});
65+
5766
test('should change for @custom-media', t => {
5867
const expected = ':root{ --breakpoint-xs: 29.25em } @custom-media --viewport-xs (width > 29.25em)';
5968
const value = ':root{ --breakpoint-xs: 29.25em } @custom-media --viewport-xs (width > var(--breakpoint-xs))';

0 commit comments

Comments
 (0)
Please sign in to comment.