:test: Font for eastAsia

This commit is contained in:
wangfengming
2020-06-07 12:38:31 +08:00
parent fdfce79e87
commit 8a3c8d4664
5 changed files with 137 additions and 3 deletions

View File

@ -21,5 +21,12 @@ describe("RunFonts", () => {
},
});
});
it("uses the font attrs for ascii and eastAsia", () => {
const tree = new Formatter().format(new RunFonts({ ascii: "Times", eastAsia: "KaiTi" }));
expect(tree).to.deep.equal({
"w:rFonts": { _attr: { "w:ascii": "Times", "w:eastAsia": "KaiTi" } },
});
});
});
});