Commit 94884c7
test: add unit tests for markdown-table model (#38)
Add comprehensive tests for all 4 exported functions:
- parseMarkdownTable: basic parsing, null returns, padding/trimming,
alignment colons, special characters, blank lines
- serializeMarkdownTable: basic serialization, empty headers, no rows,
minimum column width, missing cells, column width calculation
- parseContentBlocks: plain text, tables, mixed content, empty content,
invalid tables falling back to text, multiple tables
- serializeContentBlocks: text blocks, table blocks, mixed, empty,
missing properties
Also includes roundtrip tests (parse → serialize → parse) and
stability tests (double roundtrip produces identical output).
Fixes #34
Co-authored-by: Claude Opus 4 <noreply@anthropic.com>1 parent 59b536f commit 94884c7
1 file changed
Lines changed: 476 additions & 0 deletions
0 commit comments