feat: prompt for mobile note titles

This commit is contained in:
lucaronin
2026-05-05 00:20:33 +02:00
parent 1f66fbda59
commit 46aa43c1cd
8 changed files with 274 additions and 57 deletions

View File

@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest'
import { createMobileNoteFile } from './mobileNoteCreate'
import { createMobileNoteFile, normalizeMobileNoteCreateTitle } from './mobileNoteCreate'
describe('mobile note create', () => {
it('creates a deterministic markdown file from the current time', () => {
@@ -31,4 +31,9 @@ describe('mobile note create', () => {
expect(file.content).toContain('title: Meeting notes')
expect(file.content).toContain('# Meeting notes')
})
it('normalizes blank and padded create titles', () => {
expect(normalizeMobileNoteCreateTitle(' Meeting notes ')).toBe('Meeting notes')
expect(normalizeMobileNoteCreateTitle(' ')).toBe('Untitled')
})
})