Commit bcef1cf
test(rest): bind exceljs through the typed loadExcelJs() in the import-integration suite (#13498)
The two fixture builders in `import-integration.test.ts` bound exceljs as
`const ExcelJS: any = (await import('exceljs')).default ?? (await import('exceljs'))`,
so every `new ExcelJS.Workbook()`, `addWorksheet`, `addRow` and
`wb.xlsx.writeBuffer()` downstream of them sat outside the type system. The two
tests that exercise the server-side .xlsx import path were themselves unchecked
against the dependency they drive: a renamed method or a changed arity in
exceljs would not have been a compile error here.
Both now call `loadExcelJs()` from `src/xlsx-module.ts`, the package's single
typed, lazily-loaded exceljs binding. No second accessor is introduced and no
runtime behaviour changes — only what tsc is told.
Claude-Session: https://claude.ai/code/session_01TvqBFLRzXdSPcbusDoED9k
Co-authored-by: Claude <noreply@anthropic.com>1 parent b95ff78 commit bcef1cf
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
325 | | - | |
| 326 | + | |
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| |||
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
347 | | - | |
| 348 | + | |
348 | 349 | | |
349 | 350 | | |
350 | 351 | | |
| |||
0 commit comments