feat: create highlight manager with IndexedDB storage
Implemented TDD approach for highlight persistence: - Created IndexedDB store with 'highlights' object store - Added indexes for syncStatus and verseId for efficient queries - Implemented CRUD operations: add, update, get, getAll, delete - Added query methods: getHighlightsByVerse, getPendingHighlights - Full test coverage with fake-indexeddb mock - Added structuredClone polyfill for test environment Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
7
jest.setup.js
Normal file
7
jest.setup.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import '@testing-library/jest-dom'
|
||||
import 'fake-indexeddb/auto'
|
||||
|
||||
// Polyfill for structuredClone (required by fake-indexeddb)
|
||||
if (typeof global.structuredClone === 'undefined') {
|
||||
global.structuredClone = (obj) => JSON.parse(JSON.stringify(obj))
|
||||
}
|
||||
Reference in New Issue
Block a user