added #style method to runs

This commit is contained in:
felipe
2017-03-12 17:35:15 +01:00
parent 3dbd917667
commit 90049a31ee
3 changed files with 31 additions and 0 deletions

View File

@ -141,4 +141,16 @@ describe("Run", () => {
});
});
});
describe("#style", () => {
it("should set the style to the given styleId", () => {
run.style("myRunStyle");
const tree = new Formatter().format(run);
expect(tree).to.deep.equal({
"w:r": [
{"w:rPr": [{"w:rStyle": [{_attr: {"w:val": "myRunStyle"}}]}]},
],
});
});
});
});