Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/rest/src/import-integration.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,6 +27,7 @@ import { ObjectQL } from '@objectstack/objectql';
import { SqlDriver } from '@objectstack/driver-sql';
import { ObjectStackProtocolImplementation } from '@objectstack/metadata-protocol';
import { RestServer } from './rest-server';
import { loadExcelJs } from './xlsx-module.js';

// ---------------------------------------------------------------------------
// The real backend: better-sqlite3 `:memory:`, constructed the canonical way
Expand DownExpand Up@@ -322,7 +323,7 @@ describe('import route — real engine + protocol integration', () => {
});

it('parses a native xlsx workbook server-side and coerces cells like csv', async () => {
const ExcelJS: any = (await import('exceljs')).default ?? (await import('exceljs'));
const ExcelJS = await loadExcelJs();
const wb = new ExcelJS.Workbook();
const ws = wb.addWorksheet('Sheet1');
ws.addRow(['ID', '标题', '完成', '优先级', '分数', '截止', '负责人']);
Expand All@@ -344,7 +345,7 @@ describe('import route — real engine + protocol integration', () => {
});

it('reads xlsxBase64 without an explicit format and honors the sheet selector', async () => {
const ExcelJS: any = (await import('exceljs')).default ?? (await import('exceljs'));
const ExcelJS = await loadExcelJs();
const wb = new ExcelJS.Workbook();
wb.addWorksheet('Empty'); // decoy first sheet
const ws = wb.addWorksheet('Data');
Expand Down
Loading