update file/styles

This commit is contained in:
Tom Hunkapiller
2021-05-25 04:27:10 +03:00
parent 63cea76eac
commit b05748da25
9 changed files with 252 additions and 299 deletions

View File

@ -5,11 +5,14 @@ import { Style } from "./style";
describe("Style", () => {
describe("#constructor()", () => {
it("should set the given properties", () => {
const style = new Style({
type: "paragraph",
styleId: "myStyleId",
default: true,
});
const style = new Style(
{
type: "paragraph",
styleId: "myStyleId",
default: true,
},
{},
);
const tree = new Formatter().format(style);
expect(tree).to.deep.equal({
"w:style": { _attr: { "w:type": "paragraph", "w:styleId": "myStyleId", "w:default": true } },
@ -22,7 +25,7 @@ describe("Style", () => {
type: "paragraph",
styleId: "myStyleId",
},
"Style Name",
{ name: "Style Name" },
);
const tree = new Formatter().format(style);
expect(tree).to.deep.equal({