add test for ExternalStylesFactory when styles element is missing, to bump coverage
This commit is contained in:
@ -153,6 +153,12 @@ describe("External styles factory", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("should throw when style element isn't found", () => {
|
||||
expect(() => new ExternalStylesFactory().newInstance(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><foo/>`)).to.throw(
|
||||
"can not find styles element",
|
||||
);
|
||||
});
|
||||
|
||||
it("should parse styles elements", () => {
|
||||
// tslint:disable-next-line:no-any
|
||||
const importedStyle = new ExternalStylesFactory().newInstance(externalStyles) as any;
|
||||
|
Reference in New Issue
Block a user