fix: update note persister tests to use frontmatter-batch operations #2804
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: update note persister tests to use frontmatter-batch operations
Summary
The note persister implementation was changed to use
frontmatter-batchoperations (via@hypr/plugin-frontmatter) instead ofmd-batchoperations (via@hypr/plugin-export). This PR updates the test file to align with that implementation change.Key changes:
@hypr/plugin-exportmock with@hypr/plugin-frontmattermock@tauri-apps/api/path(sep function) and@hypr/tiptap/shared(isValidTiptapContent, json2md)frontmatterCommands.serializeBatchcalls with the new{frontmatter, content}data structureReview & Testing Checklist for Human
collect.ts- specifically thatcollectNoteWriteOpsproducesfrontmatter-batchoperations with the expected frontmatter fieldspnpm -F desktop testlocally to confirm all 236 tests passisValidTiptapContentmock logic matches the real implementation in@hypr/tiptap/sharedTest plan: Run
pnpm -r testandpnpm -r typecheckto verify all tests pass and there are no type errors.Notes
apps/webfail due to missing browser installation (environment issue, not related to this change)dprint checkcommand has environment issues with rustfmt (missing shared library), but this PR only modifies TypeScript filesLink to Devin run: https://app.devin.ai/sessions/e5599f72fc514da78cd9e1632acd2cdb
Requested by: yujonglee (@yujonglee)