Added test to account for module parsing failure for binary files
This commit is contained in:
parent
aa78e27a44
commit
2cd6489579
|
@ -527,4 +527,26 @@ You may need an appropriate loader to handle this file type, currently no loader
|
|||
}
|
||||
);
|
||||
});
|
||||
|
||||
it("should show 'source code omitted for this binary file' when module parsing fails for binary files", done => {
|
||||
const folder = path.join(__dirname, "/fixtures");
|
||||
getErrors(
|
||||
{
|
||||
mode: "development",
|
||||
entry: path.resolve(folder, "./font.ttf"),
|
||||
module: {}
|
||||
},
|
||||
(errors, warnings) => {
|
||||
expect(errors).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
"../font.ttf 1:0
|
||||
Module parse failed: Unexpected character ' |