import { describe, it, expect } from 'vitest'; import { initialNoteContent } from './noteTemplate'; describe('initialNoteContent', () => { it('seeds an H1 from the note name, without the extension', () => { expect(initialNoteContent('Meeting notes.md')).toBe('# Meeting notes\n\n'); }); it('leaves a dotted name intact apart from the .md', () => { expect(initialNoteContent('Release v1.2.md')).toBe('# Release v1.2\n\n'); }); it('keeps markdown-significant characters in the title literal', () => { // Renders as an H1 reading "C# notes", which is what the author typed. expect(initialNoteContent('C# notes.md')).toBe('# C# notes\n\n'); }); it('returns empty content rather than a bare heading for a nameless file', () => { expect(initialNoteContent('.md')).toBe(''); expect(initialNoteContent(' ')).toBe(''); }); });