Skip to content

Commit

Permalink
tests: for invalid library name error message
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 authored and sokra committed Jan 18, 2021
1 parent b5b62c4 commit ea9f5c4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/Errors.test.js
Expand Up @@ -871,4 +871,19 @@ describe("loaders", () => {
}
`);
});

it("should throw error for invalid library name", async () => {
await expect(
compile({
output: {
libraryTarget: "var"
}
})
).rejects.toMatchInlineSnapshot(`
Object {
"message": "output.library.name must be a string or string array",
"stack": "Error: output.library.name must be a string or string array",
}
`);
});
});

0 comments on commit ea9f5c4

Please sign in to comment.