-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add fix multiple print areas error test case
- Loading branch information
1 parent
80aacf6
commit 24b435b
Showing
2 changed files
with
23 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const ExcelJS = verquire('exceljs'); | ||
|
||
// const NEW_TEST_17_XLSX_FILE_NAME = './spec/integration/data/test-new-pr-17.xlsx'; | ||
|
||
describe('new pr related issues', () => { | ||
describe('new pr 17 serialize and deserialize multiple print areas on one worksheet', () => { | ||
it('Multiple print areas can be correctly read to settings', async () => { | ||
const wb = new ExcelJS.Workbook(); | ||
const ws = wb.addWorksheet('sheet'); | ||
const writePrintArea = 'A2:B5&&A7:B10&&A13:B17'; | ||
ws.pageSetup.printArea = writePrintArea; | ||
// await wb.xlsx.writeFile(NEW_TEST_17_XLSX_FILE_NAME); | ||
const buffer = await wb.xlsx.writeBuffer(); | ||
await wb.xlsx.load(buffer); | ||
const worksheet = wb.getWorksheet('sheet'); | ||
const readPintArea = worksheet.pageSetup.printArea; | ||
expect(writePrintArea).to.equal(readPintArea); | ||
}); | ||
}); | ||
}); |