rename paragraph#createRun to paragraph#createTextRun
This commit is contained in:
@ -38,7 +38,7 @@ export class Paragraph extends XmlComponent {
|
||||
return this;
|
||||
}
|
||||
|
||||
public createRun(text: string): TextRun {
|
||||
public createTextRun(text: string): TextRun {
|
||||
const run = new TextRun(text);
|
||||
this.addText(run);
|
||||
return run;
|
||||
|
@ -32,9 +32,9 @@ describe("Paragraph", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("#createRun", () => {
|
||||
describe("#createTextRun", () => {
|
||||
it("should add a new run to the paragraph and return it", () => {
|
||||
const run = paragraph.createRun("this is a test run");
|
||||
const run = paragraph.createTextRun("this is a test run");
|
||||
expect(run).to.be.instanceof(docx.TextRun);
|
||||
const tree = new Formatter().format(paragraph)["w:p"];
|
||||
expect(tree).to.be.an("array").which.includes({
|
||||
|
Reference in New Issue
Block a user