Fix tests

This commit is contained in:
Travis Fletcher
2019-05-16 11:15:20 -04:00
parent 31a9111667
commit 3a593a53d3
2 changed files with 4 additions and 2 deletions

View File

@ -43,7 +43,9 @@ describe("TableColumn", () => {
});
const tree2 = new Formatter().format(cells[1]);
expect(tree2).to.deep.equal({ "w:tc": [{ "w:p": EMPTY_OBJECT }] });
expect(tree2).to.deep.equal({
"w:tc": [{ "w:tcPr": [{ "w:vMerge": { _attr: { "w:val": "continue" } } }] }, { "w:p": EMPTY_OBJECT }],
});
const tree3 = new Formatter().format(cells[2]);
expect(tree3).to.deep.equal({

View File

@ -16,7 +16,7 @@ export class TableColumn {
public mergeCells(startIndex: number, endIndex: number): TableCell {
this.cells[startIndex].addVerticalMerge(VMergeType.RESTART);
for (let i = startIndex; i <= endIndex; i++) {
for (let i = startIndex + 1; i <= endIndex; i++) {
this.cells[i].addVerticalMerge(VMergeType.CONTINUE);
}