Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit a4adc51

Browse files
committed
fix(unit): resolve typecheck errors
1 parent 864543e commit a4adc51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/server/src/services/ocr/ocr_service.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ describe('OCRService', () => {
229229
language: 'eng'
230230
};
231231

232-
await ocrService.storeOCRResult('note123', 'note', ocrResult);
232+
await ocrService.storeOCRResult('note123', ocrResult, 'note');
233233

234234
expect(mockSql.execute).toHaveBeenCalledWith(
235235
expect.stringContaining('INSERT OR REPLACE INTO ocr_results'),
@@ -248,7 +248,7 @@ describe('OCRService', () => {
248248
language: 'eng'
249249
};
250250

251-
await expect(ocrService.storeOCRResult('note123', 'note', ocrResult)).rejects.toThrow('Database error');
251+
await expect(ocrService.storeOCRResult('note123', ocrResult, 'note')).rejects.toThrow('Database error');
252252
expect(mockLog.error).toHaveBeenCalledWith('Failed to store OCR result: Error: Database error');
253253
});
254254
});
@@ -329,7 +329,7 @@ describe('OCRService', () => {
329329

330330
const result = await ocrService.processNoteOCR('note123', { forceReprocess: true });
331331

332-
expect(result.text).toBe('New processed text');
332+
expect(result?.text).toBe('New processed text');
333333
expect(mockNote.getBlob).toHaveBeenCalled();
334334
});
335335

0 commit comments

Comments
 (0)