From 6c8ed03d3655806af1bad93c06d7f5e6f4d26ddc Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 29 Sep 2026 12:13:00 +0200 Subject: [PATCH] 35b - review: test that a stray task-list child reducing to nothing writes no item --- src/markdown/emit/plain-reduction.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/markdown/emit/plain-reduction.test.ts b/src/markdown/emit/plain-reduction.test.ts index 74e1751..bcfecb4 100644 --- a/src/markdown/emit/plain-reduction.test.ts +++ b/src/markdown/emit/plain-reduction.test.ts @@ -125,6 +125,7 @@ test('spells a task list as a bullet list whose items lead with their state', () assert.equal(plain(node('taskList', {}, task('DONE', 'Write the spec'), nested, task('TODO', 'Ship it'))), '- [x] Write the spec\n - [ ] Review\n- [ ] Ship it\n') assert.equal(plain(node('taskList', {}, nested, task('DONE', ''), said('Stray'))), '- - [ ] Review\n- [x]\n- Stray\n') assert.equal(plain(node('taskList', {}, node('taskList', {}), task('DONE', 'a'), said('b'), node('taskList', {}, task('TODO', 'c')))), '- [x] a\n- b\n - [ ] c\n') + assert.equal(plain(node('taskList', {}, paragraph(), task('DONE', 'a'))), '- [x] a\n') assert.equal(plain(bulletList(item(said('x'))), node('taskList', {}, task('DONE', 'a'), node('taskList', {}, task('TODO', 'c')))), '- x\n- [x] a\n - [ ] c\n') assert.equal(plain(node('taskList', {}), task('TODO', 'Loose')), 'Loose\n') const blockTask = node('blockTaskItem', { state: 'DONE' }, said('First.'), said('Second.'))