Skip to content

Commit

Permalink
Add preserve computed test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroPerezMartin committed Feb 14, 2018
1 parent 6320e70 commit 602b412
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/expected/preserve-computed.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions test/fixtures/preserve-computed.css
@@ -0,0 +1,3 @@
:root {
--test-varibale: '#fc0';
}
16 changes: 16 additions & 0 deletions test/preserve-computed.test.js
@@ -0,0 +1,16 @@
const tap = require('tap');
const ClientKitCss = require('../');
const utils = require('./utils');

tap.test('preserve computed styles', (t) => {
const css = new ClientKitCss('imports', {
files: {
'test/out/preserve-computed.css': 'test/fixtures/preserve-computed.css'
}
});
css.execute((err, results) => {
t.equal(err, null);
utils.checkOutput(t, 'preserve-computed.css');
t.end();
});
});

0 comments on commit 602b412

Please sign in to comment.