it('supports mixins with multiple content', () => {
return run('@define-mixin m { @media { @mixin-content; } @media { @mixin-content; } } ' +
'@mixin m { a {} }',
'@media { a {} } @media { a {} }');
});
This is the result from the test suite:
$ jest --coverage && eslint *.js test/**/*.js
FAIL test/test.test.js
● supports mixins with multiple content
expect(received).toEqual(expected)
Expected value to equal:
"@media { a {} } @media { a {} }"
Received:
"@media { a {} } @media { }"
at postcss.process.then.result (test/test.test.js:9:28)
at process._tickCallback (internal/process/next_tick.js:103:7)
I added the following test:
This is the result from the test suite:
Seems like
replaceWith
is emptyingrule.nodes
: https://github.com/postcss/postcss-mixins/blob/master/index.js#L69