"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/cssnano/src/__tests__/api.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).

api.js  (cssnano-cssnano-5.0.6):api.js  (cssnano-cssnano-5.0.7)
import postcss from 'postcss'; import postcss from 'postcss';
import nano from '..'; import nano from '..';
function pluginMacro(instance) { function pluginMacro(instance) {
const css = 'h1 { color: #ffffff }'; const css = 'h1 { color: #ffffff }';
const min = 'h1{color:#fff}'; const min = 'h1{color:#fff}';
return () => return () =>
instance.process(css).then((result) => { instance.process(css, { from: undefined }).then((result) => {
expect(result.css).toBe(min); expect(result.css).toBe(min);
}); });
} }
test('can be used as a postcss plugin', pluginMacro(postcss().use(nano()))); test('can be used as a postcss plugin', pluginMacro(postcss().use(nano())));
test('can be used as a postcss plugin (2)', pluginMacro(postcss([nano()]))); test('can be used as a postcss plugin (2)', pluginMacro(postcss([nano()])));
test('can be used as a postcss plugin (3)', pluginMacro(postcss([nano]))); test('can be used as a postcss plugin (3)', pluginMacro(postcss([nano])));
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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