Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 64468ee

Browse files
author
심 동근
committed
add test case
1 parent 6e6c130 commit 64468ee

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
const ExcelJS = verquire('exceljs');
2+
3+
const TEST_XLSX_FILE_NAME = './spec/out/wb.test.xlsx';
4+
5+
describe('github issues', () => {
6+
it('pull request 1334 - Fix the error that comment does not delete at spliceColumn', async () => {
7+
(async () => {
8+
const wb = new ExcelJS.Workbook();
9+
const ws = wb.addWorksheet('testSheet');
10+
11+
ws.addRow([
12+
'test1',
13+
'test2',
14+
'test3',
15+
'test4',
16+
'test5',
17+
'test6',
18+
'test7',
19+
'test8',
20+
]);
21+
22+
const row = ws.getRow(1);
23+
row.getCell(1).note = 'test1';
24+
row.getCell(2).note = 'test2';
25+
row.getCell(3).note = 'test3';
26+
row.getCell(4).note = 'test4';
27+
28+
ws.spliceColumns(2, 1);
29+
30+
expect(row.getCell(1).note).to.equal('test1');
31+
expect(row.getCell(2).note).to.equal('test3');
32+
expect(row.getCell(3).note).to.equal('test4');
33+
expect(row.getCell(4).note).to.equal(undefined);
34+
35+
await wb.xlsx.writeFile(TEST_XLSX_FILE_NAME);
36+
})();
37+
});
38+
});

0 commit comments

Comments
 (0)