Skip to content

Commit d140432

Browse files
committed
test: update for issue #209
1 parent e962b52 commit d140432

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ const processing = (input, options) => {
66
return postcss([plugin(options)]).process(input).css;
77
};
88

9-
test('it change circular reference witch cacl', t => {
10-
const expected = ':root { --original-var: 4px; --nested-var: calc(2 * var(--original-var)); } .class-name { @mixin mixinName calc(2 * 4px); }';
11-
const value = ':root { --original-var: 4px; --nested-var: calc(2 * var(--original-var)); } .class-name { @mixin mixinName var(--nested-var); }';
12-
t.is(processing(value), expected);
9+
test('it change circular reference witch declarationByWalk option', t => {
10+
const expected = ':root { --nested-var: calc(2 * var(--original-var)); } .class-name { @mixin mixinName calc(2 * 4px); } :root { --original-var: 4px; }';
11+
const value = ':root { --nested-var: calc(2 * var(--original-var)); } .class-name { @mixin mixinName var(--nested-var); } :root { --original-var: 4px; }';
12+
t.is(processing(value, {declarationByWalk: true}), expected);
1313
});
1414

1515
test('it change circular reference', t => {

0 commit comments

Comments
 (0)