-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propagate async errors to webpack (#78)
- Loading branch information
Showing
5 changed files
with
44 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
var should = require("should"); | ||
|
||
var fs = require("fs"); | ||
var path = require("path"); | ||
|
||
var runLoader = require("./fakeModuleSystem"); | ||
var pugLoader = require("../"); | ||
|
||
var fixtures = path.join(__dirname, "fixtures"); | ||
|
||
describe("extend+error", function() { | ||
it("should propagate async errors to Webpack", function(done) { | ||
var template = path.join(fixtures, "extend+error", "error.pug"); | ||
runLoader(pugLoader, path.join(fixtures, "extend+error"), template, fs.readFileSync(template, "utf-8"), function(err, result) { | ||
should(err).be.not.null(); | ||
done(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
extend /parent.pug | ||
|
||
p This will cause an error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
block output | ||
p This might not see the light of day |