#1744 - Add vanish and specVanish

This commit is contained in:
Dolan Miu
2022-10-28 22:20:16 +01:00
parent 29f421686f
commit 4cfb0ade88
6 changed files with 83 additions and 1 deletions

View File

@ -519,4 +519,42 @@ describe("Run", () => {
});
});
});
describe("#vanish and #specVanish", () => {
it("should correctly set vanish", () => {
const run = new Run({
vanish: true,
});
const tree = new Formatter().format(run);
expect(tree).to.deep.equal({
"w:r": [
{
"w:rPr": [
{
"w:vanish": {},
},
],
},
],
});
});
it("should correctly set specVanish", () => {
const run = new Run({
specVanish: true,
});
const tree = new Formatter().format(run);
expect(tree).to.deep.equal({
"w:r": [
{
"w:rPr": [
{
"w:specVanish": {},
},
],
},
],
});
});
});
});