diff --git a/src/file/paragraph/run/run.spec.ts b/src/file/paragraph/run/run.spec.ts index b2027c2cfb..d065181fb4 100644 --- a/src/file/paragraph/run/run.spec.ts +++ b/src/file/paragraph/run/run.spec.ts @@ -8,8 +8,38 @@ import { EmphasisMarkType } from "./emphasis-mark"; import { PageNumber, Run } from "./run"; import { UnderlineType } from "./underline"; import { TextEffect } from "./properties"; - describe("Run", () => { + describe("#noproof()", () => { + it("turns off spelling and grammar checkers for a run", () => { + const run = new Run({ + noProof: true, + }); + const tree = new Formatter().format(run); + expect(tree).to.deep.equal({ + "w:r": [ + { + "w:rPr": [ + { "w:noProof": {} }, + ], + }, + ], + }); + }); + const run = new Run({ + noProof: false, + }); + const tree = new Formatter().format(run); + expect(tree).to.deep.equal({ + "w:r": [ + { + "w:rPr": [ + { "w:noProof": { _attr: { "w:val": false } } }, + ], + }, + ], + }); + }); + describe("#bold()", () => { it("it should add bold to the properties", () => { const run = new Run({