6 Commits

Author SHA1 Message Date
matt wilkie
5999dabd0b test fix: sqlite no such table entity_changes
claude:
I've updated the test file to:

Add the entity_changes table with all required fields
Add missing fields to the notes table (isDeleted)
Add missing fields when inserting the parent note
2024-11-16 21:39:08 -07:00
matt wilkie
9cd398d1ce test fix: setup CLS context
claude sez: "I see the issue. The tests are failing because we need to set up the CLS (Continuation Local Storage) context that Trilium uses for transactions. Let me check how this is handled in other tests:

I've updated the test file to:

I've updated the test file to:

Use an in-memory database for testing
Set up necessary database tables in beforeEach
Wrap all database operations in cls.init() and sql.transactional()
Handle async operations properly
2024-11-16 21:36:07 -07:00
matt wilkie
e397011437 test fix: describe not defined
"$ npx tsx spec/services/import/single.spec.ts
/home/mhw/dev/tnext/spec/services/import/single.spec.ts:6
describe('HTML Import', () => {
^
ReferenceError: describe is not defined
    at <anonymous> (/home/mhw/dev/tnext/spec/services/import/single.spec.ts:6:1)

Node.js v18.17.1"
2024-11-16 21:26:26 -07:00
matt wilkie
a1ff4bb132 test fix: do not access content directly
"TSError: ⨯ Unable to compile TypeScript:
spec/services/import/single.spec.ts:137:25 - error TS2339: Property 'content' does not exist on type 'BNote'."
2024-11-16 21:21:24 -07:00
matt wilkie
14d7e3e1ce test: attempt fix test import error by using importSinglefile instead of importHtml 2024-11-16 21:17:50 -07:00
maphew
3a7564f733 a missed .ts file 2024-11-16 09:45:13 -07:00