Skip to content

Commit

Permalink
Merge ce1eec5 into a3fdd2f
Browse files Browse the repository at this point in the history
  • Loading branch information
ecwillis committed Oct 26, 2018
2 parents a3fdd2f + ce1eec5 commit ec6627b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
5 changes: 4 additions & 1 deletion css.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ class CSSTask extends TaskKitTask {

postcss(processes)
.process(contents, { from: input, to: outputFilename, map })
.then(result => { done(null, result); });
.then(result => { done(null, result); })
.catch(err => {
done(err);
});
},
messages: (pcss, done) => {
// istanbul ignore next
Expand Down
20 changes: 10 additions & 10 deletions test/expected/font-parsing-whitelist.css

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

1 change: 1 addition & 0 deletions test/fixtures/inport-err.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "non-existent-file.css";
12 changes: 12 additions & 0 deletions test/imports.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,15 @@ tap.test('imports in css', (t) => {
t.end();
});
});

tap.test('import err in css', (t) => {
const css = new ClientKitCss('imports', {
files: {
'test/out/imports-err.css': 'test/fixtures/import-err.css'
}
});
css.execute((err, results) => {
t.notEqual(err, null);
t.end();
});
});

0 comments on commit ec6627b

Please sign in to comment.