Skip to content

Commit

Permalink
Added font parsing whitelist tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroPerezMartin committed Dec 29, 2017
1 parent 31b16ed commit 54a016a
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
64 changes: 64 additions & 0 deletions test/expected/font-parsing-whitelist.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/font-parsing-whitelist.css
@@ -0,0 +1,3 @@
body {
font-family: 'Lato', sans-serif;
}
17 changes: 17 additions & 0 deletions test/font-parsing-whitelist.test.js
@@ -0,0 +1,17 @@
const tap = require('tap');
const ClientKitCss = require('../');
const utils = require('./utils');

tap.test('font parsing whitelist in css', (t) => {
const css = new ClientKitCss('font parsing whitelist', {
fontParsingWhitelist: 'font-parsing-whitelist.css',
files: {
'test/out/font-parsing-whitelist.css': 'test/fixtures/font-parsing-whitelist.css'
}
});
css.execute((err, results) => {
t.equal(err, null);
utils.checkOutput(t, 'font-parsing-whitelist.css');
t.end();
});
});

0 comments on commit 54a016a

Please sign in to comment.