appease the linter
This commit is contained in:
@ -96,7 +96,7 @@ class TableCell extends XmlComponent {
|
|||||||
|
|
||||||
public push(content: Paragraph | Table): TableCell {
|
public push(content: Paragraph | Table): TableCell {
|
||||||
this.root.push(content);
|
this.root.push(content);
|
||||||
return this
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public prepForXml(): object {
|
public prepForXml(): object {
|
||||||
@ -106,7 +106,7 @@ class TableCell extends XmlComponent {
|
|||||||
if (!content[content.length - 1]["w:p"]) {
|
if (!content[content.length - 1]["w:p"]) {
|
||||||
content.push(new Paragraph().prepForXml());
|
content.push(new Paragraph().prepForXml());
|
||||||
}
|
}
|
||||||
return retval
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
public createParagraph(text?: string): Paragraph {
|
public createParagraph(text?: string): Paragraph {
|
||||||
|
@ -57,7 +57,7 @@ describe("Document", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should create a table with the correct dimensions", () => {
|
it("should create a table with the correct dimensions", () => {
|
||||||
const table = document.createTable(2, 3);
|
document.createTable(2, 3);
|
||||||
const body = new Formatter().format(document)["w:document"][1]["w:body"];
|
const body = new Formatter().format(document)["w:document"][1]["w:body"];
|
||||||
expect(body).to.be.an("array").which.has.length.at.least(1);
|
expect(body).to.be.an("array").which.has.length.at.least(1);
|
||||||
expect(body[0]).to.have.property("w:tbl").which.includes({
|
expect(body[0]).to.have.property("w:tbl").which.includes({
|
||||||
|
@ -84,7 +84,7 @@ describe("Table", () => {
|
|||||||
|
|
||||||
describe("#setWidth", () => {
|
describe("#setWidth", () => {
|
||||||
it("sets the preferred width on the table", () => {
|
it("sets the preferred width on the table", () => {
|
||||||
const table = new Table(2, 2).setWidth("pct", 1000)
|
const table = new Table(2, 2).setWidth("pct", 1000);
|
||||||
const tree = new Formatter().format(table);
|
const tree = new Formatter().format(table);
|
||||||
expect(tree).to.have.property("w:tbl").which.is.an("array").with.has.length.at.least(1);
|
expect(tree).to.have.property("w:tbl").which.is.an("array").with.has.length.at.least(1);
|
||||||
expect(tree["w:tbl"][0]).to.deep.equal({
|
expect(tree["w:tbl"][0]).to.deep.equal({
|
||||||
|
Reference in New Issue
Block a user