MCPcopy
hub / github.com/exceljs/exceljs / test

Function test

spec/integration/pr/test-pr-2244.spec.js:5–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3describe('pull request 2244', () => {
4 it('pull request 2244- Fix xlsx.writeFile() not catching error when error occurs', async () => {
5 async function test() {
6 const workbook = new ExcelJS.Workbook();
7 const worksheet = workbook.addWorksheet('sheet');
8 const imageId1 = workbook.addImage({
9 filename: 'path/to/image.jpg', // Non-existent file
10 extension: 'jpeg',
11 });
12 worksheet.addImage(imageId1, 'B2:D6');
13 await workbook.xlsx.writeFile('test.xlsx');
14 }
15 let error;
16 try {
17 await test();

Callers 1

Calls 4

addWorksheetMethod · 0.95
addImageMethod · 0.95
addImageMethod · 0.65
writeFileMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…