(body: string, path = 'inbox/Note.md')
| 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. |
| 27 | function 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 | |
| 46 | function installZen(overrides: Record<string, unknown> = {}): void { |
| 47 | Object.defineProperty(window, 'zen', { |
no outgoing calls
no test coverage detected