Add tests

This commit is contained in:
Dolan
2021-03-13 20:23:15 +00:00
parent cc9a966f53
commit 4bc0421055
6 changed files with 77 additions and 11 deletions

View File

@ -8,8 +8,10 @@ import {
CharacterSpacing,
Color,
DoubleStrike,
Emboss,
Highlight,
HighlightComplexScript,
Imprint,
Italics,
ItalicsComplexScript,
RightToLeft,
@ -63,6 +65,8 @@ export interface IRunStylePropertiesOptions {
};
readonly shadingComplexScript?: boolean | IRunStylePropertiesOptions["shading"];
readonly shadow?: IRunStylePropertiesOptions["shading"];
readonly emboss?: boolean;
readonly imprint?: boolean;
}
export interface IRunPropertiesOptions extends IRunStylePropertiesOptions {
@ -169,6 +173,14 @@ export class RunProperties extends IgnoreIfEmptyXmlComponent {
this.push(new CharacterSpacing(options.characterSpacing));
}
if (options.emboss) {
this.push(new Emboss());
}
if (options.imprint) {
this.push(new Imprint());
}
const shading = options.shading || options.shadow;
if (shading) {
this.push(new Shading(shading.type, shading.fill, shading.color));