MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / makeNote

Function makeNote

packages/app-core/src/store.test.ts:27–44  ·  view source on GitHub ↗
(body: string, path = 'inbox/Note.md')

Source from the content-addressed store, hash-verified

25// Some store flows validate tabs against `state.notes` by path, so tests that
26// open multiple tabs need note fixtures whose metadata matches each tab path.
27function makeNote(body: string, path = 'inbox/Note.md') {
28 const title = path.split('/').pop()?.replace(/\.md$/i, '') || 'Note'
29 return {
30 path,
31 title,
32 folder: 'inbox' as const,
33 siblingOrder: 0,
34 createdAt: 0,
35 updatedAt: 1,
36 size: body.length,
37 tags: [],
38 wikilinks: [],
39 assetEmbeds: [],
40 hasAttachments: false,
41 excerpt: body,
42 body
43 }
44}
45
46function installZen(overrides: Record<string, unknown> = {}): void {
47 Object.defineProperty(window, 'zen', {

Callers 2

installZenFunction · 0.70
store.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected