"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/cssnano/src/__tests__/issue26.js" between
cssnano-cssnano-5.0.6.tar.gz and cssnano-cssnano-5.0.7.tar.gz

About: cssnano is a modular CSS minifier (built on top of the PostCSS ecosystem).

issue26.js  (cssnano-cssnano-5.0.6):issue26.js  (cssnano-cssnano-5.0.7)
skipping to change at line 27 skipping to change at line 27
} }
.test { .test {
width: 500px; width: 500px;
} }
`; `;
const expected = `@media print{.test{-webkit-border-radius:0;border-radius:0;-we bkit-box-shadow:none;box-shadow:none}}.test{width:500px}`; const expected = `@media print{.test{-webkit-border-radius:0;border-radius:0;-we bkit-box-shadow:none;box-shadow:none}}.test{width:500px}`;
test('it should compress whitespace after node.clone()', () => { test('it should compress whitespace after node.clone()', () => {
const processor = postcss([ const plugin = () => {
postcss.plugin('cloner', () => { return {
return (css) => { postcssPlugin: 'cloner',
css.walkAtRules((rule) => { Once(root) {
css.prepend(rule.clone()); root.walkAtRules((rule) => {
root.prepend(rule.clone());
rule.remove(); rule.remove();
}); });
}; },
}), };
nano(), };
]); plugin.postcss = true;
const processor = postcss([plugin, nano()]);
return processor return processor
.process(fixture, { from: undefined }) .process(fixture, { from: undefined })
.then((r) => expect(r.css).toBe(expected)); .then((r) => expect(r.css).toBe(expected));
}); });
 End of changes. 2 change blocks. 
9 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)