Skip to content

Commit 2261694

Browse files
committedJan 17, 2018
test: return comment test )
1 parent da9fdd3 commit 2261694

File tree

1 file changed

+53
-53
lines changed

1 file changed

+53
-53
lines changed
 

‎test/test.js

+53-53
Original file line numberDiff line numberDiff line change
@@ -12,65 +12,65 @@ test('it change circular reference', t => {
1212
t.is(processing(value), expected);
1313
});
1414

15-
// test('it change first properties for @for', t => {
16-
// const expected = ':root{ --from: 1; } @for $i from 1 to 2';
17-
// const value = ':root{ --from: 1; } @for $i from var(--from) to 2';
18-
// t.is(processing(value), expected);
19-
// });
15+
test('it change first properties for @for', t => {
16+
const expected = ':root{ --from: 1; } @for $i from 1 to 2';
17+
const value = ':root{ --from: 1; } @for $i from var(--from) to 2';
18+
t.is(processing(value), expected);
19+
});
2020

21-
// test('it change second properties for @for', t => {
22-
// const expected = ':root{ --to: 2; } @for $i from 1 to 2';
23-
// const value = ':root{ --to: 2; } @for $i from 1 to var(--to)';
24-
// t.is(processing(value), expected);
25-
// });
21+
test('it change second properties for @for', t => {
22+
const expected = ':root{ --to: 2; } @for $i from 1 to 2';
23+
const value = ':root{ --to: 2; } @for $i from 1 to var(--to)';
24+
t.is(processing(value), expected);
25+
});
2626

27-
// test('it change two properties for @for', t => {
28-
// const expected = ':root{ --from: 1; --to: 2; } @for $i from 1 to 2';
29-
// const value = ':root{ --from: 1; --to: 2; } @for $i from var(--from) to var(--to)';
30-
// t.is(processing(value), expected);
31-
// });
27+
test('it change two properties for @for', t => {
28+
const expected = ':root{ --from: 1; --to: 2; } @for $i from 1 to 2';
29+
const value = ':root{ --from: 1; --to: 2; } @for $i from var(--from) to var(--to)';
30+
t.is(processing(value), expected);
31+
});
3232

33-
// test('it change three properties for @for', t => {
34-
// const expected = ':root{ --from: 1; --to: 2; --step: 5 } @for $i from 1 to 2 by 5';
35-
// const value = ':root{ --from: 1; --to: 2; --step: 5 } @for $i from var(--from) to var(--to) by var(--step)';
36-
// t.is(processing(value), expected);
37-
// });
33+
test('it change three properties for @for', t => {
34+
const expected = ':root{ --from: 1; --to: 2; --step: 5 } @for $i from 1 to 2 by 5';
35+
const value = ':root{ --from: 1; --to: 2; --step: 5 } @for $i from var(--from) to var(--to) by var(--step)';
36+
t.is(processing(value), expected);
37+
});
3838

39-
// test('it change two properties for @if', t => {
40-
// const expected = ':root{ --first: 1; --second: 2; } @if 1 < 2';
41-
// const value = ':root{ --first: 1; --second: 2; } @if var(--first) < var(--second)';
42-
// t.is(processing(value, {atRules: ['if']}), expected);
43-
// });
39+
test('it change two properties for @if', t => {
40+
const expected = ':root{ --first: 1; --second: 2; } @if 1 < 2';
41+
const value = ':root{ --first: 1; --second: 2; } @if var(--first) < var(--second)';
42+
t.is(processing(value, {atRules: ['if']}), expected);
43+
});
4444

45-
// test('it change two properties for @if, @else if', t => {
46-
// const expected = ':root{ --first: 1; --second: 2; } @if 1 < 2 { color: olive; } @else if 1 > 2 { color: red; }';
47-
// const value = ':root{ --first: 1; --second: 2; } @if var(--first) < var(--second) { color: olive; } @else if var(--first) > var(--second) { color: red; }';
48-
// t.is(processing(value, {atRules: ['if', 'else']}), expected);
49-
// });
45+
test('it change two properties for @if, @else if', t => {
46+
const expected = ':root{ --first: 1; --second: 2; } @if 1 < 2 { color: olive; } @else if 1 > 2 { color: red; }';
47+
const value = ':root{ --first: 1; --second: 2; } @if var(--first) < var(--second) { color: olive; } @else if var(--first) > var(--second) { color: red; }';
48+
t.is(processing(value, {atRules: ['if', 'else']}), expected);
49+
});
5050

51-
// test('it change multi properties for @each', t => {
52-
// const expected = ':root{ --array: foo, bar, baz; } @each $val in foo, bar, baz {} @for foo, bar, baz {}';
53-
// const value = ':root{ --array: foo, bar, baz; } @each $val in var(--array) {} @for var(--array) {}';
54-
// t.is(processing(value, {atRules: ['each']}), expected);
55-
// });
51+
test('it change multi properties for @each', t => {
52+
const expected = ':root{ --array: foo, bar, baz; } @each $val in foo, bar, baz {} @for foo, bar, baz {}';
53+
const value = ':root{ --array: foo, bar, baz; } @each $val in var(--array) {} @for var(--array) {}';
54+
t.is(processing(value, {atRules: ['each']}), expected);
55+
});
5656

57-
// test('it without variables', t => {
58-
// const expected = ':root{ --red: red; } @if var(--green) { color: var(--green) }';
59-
// const value = ':root{ --red: red; } @if var(--green) { color: var(--green) }';
60-
// t.is(processing(value), expected);
61-
// });
57+
test('it without variables', t => {
58+
const expected = ':root{ --red: red; } @if var(--green) { color: var(--green) }';
59+
const value = ':root{ --red: red; } @if var(--green) { color: var(--green) }';
60+
t.is(processing(value), expected);
61+
});
6262

63-
// test('chould change from options variables', t => {
64-
// const expected = '@if green { .text-green { color: var(--green) }}';
65-
// const value = '@if var(--green) { .text-green { color: var(--green) }}';
66-
// const variables = {
67-
// '--green': 'green'
68-
// };
69-
// t.is(processing(value, {variables: variables}), expected);
70-
// });
63+
test('chould change from options variables', t => {
64+
const expected = '@if green { .text-green { color: var(--green) }}';
65+
const value = '@if var(--green) { .text-green { color: var(--green) }}';
66+
const variables = {
67+
'--green': 'green'
68+
};
69+
t.is(processing(value, {variables: variables}), expected);
70+
});
7171

72-
// test('should change for @custom-media', t => {
73-
// const expected = ':root{ --breakpoint-xs: 29.25em } @custom-media --viewport-xs (width > 29.25em)';
74-
// const value = ':root{ --breakpoint-xs: 29.25em } @custom-media --viewport-xs (width > var(--breakpoint-xs))';
75-
// t.is(processing(value, {atRules: ['custom-media']}), expected);
76-
// });
72+
test('should change for @custom-media', t => {
73+
const expected = ':root{ --breakpoint-xs: 29.25em } @custom-media --viewport-xs (width > 29.25em)';
74+
const value = ':root{ --breakpoint-xs: 29.25em } @custom-media --viewport-xs (width > var(--breakpoint-xs))';
75+
t.is(processing(value, {atRules: ['custom-media']}), expected);
76+
});

0 commit comments

Comments
 (0)
Please sign in to comment.