UNPKG

@mozaic-ds/postcss-prepend

Version:

PostCSS plugin that adds content to the beginning of your CSS/SCSS file.

26 lines (23 loc) 566 B
const postcss = require('postcss') const plugin = require('./') async function run(input, output, opts) { const result = await postcss([plugin(opts)]).process(input, { from: undefined }) expect(result.css).toEqual(output) expect(result.warnings()).toHaveLength(0) } it('prepend content', async () => { await run( `.test-content { background: #ffffff; color: #000000; font-size: 12px; }`, `$customVariable: development; .test-content { background: #ffffff; color: #000000; font-size: 12px; }`, '$customVariable: development;' ) })