Skip to content

Commit

Permalink
test: add test for basic usage (no options)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Aug 10, 2020
1 parent 8c2cbc5 commit ab8b2d3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/basic/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const postcss = require('postcss');
const mod = require('../..');
const css = require('../noop-template');

describe('basic test', () => {
test('should minify css', async () => {
const input = css`
p {
color: yellow;
}
`;

const res = await postcss([mod()]).process(input, {
from: 'input.css',
to: 'output.css',
});

expect(res.css).toBe('p{color:#ff0}');
});
});

0 comments on commit ab8b2d3

Please sign in to comment.