test(acp-snapshot): cover the delta-insert trailing-newline branch
formatSystemPromptSnapshot's insert-join ternary had its already-newline- terminated arm unexercised (a delta whose insert ends in a blank line), failing the per-file 100% branch gate on suite.ts (99.24%).
This commit is contained in:
@@ -273,6 +273,12 @@ describe('formatSystemPromptSnapshot', () => {
|
||||
{ keepStart: 1, keepEnd: 0, insert: ['new', 'lines'] },
|
||||
])).toBe('prompt\n\n<!-- request/header-delta 1: keepStart=1, keepEnd=0 -->\n\nnew\nlines\n')
|
||||
})
|
||||
|
||||
it('does not double the newline of a delta insert with a trailing blank line', () => {
|
||||
expect(formatSystemPromptSnapshot('prompt\n', [
|
||||
{ keepStart: 2, keepEnd: 1, insert: ['tail', ''] },
|
||||
])).toBe('prompt\n\n<!-- request/header-delta 1: keepStart=2, keepEnd=1 -->\n\ntail\n')
|
||||
})
|
||||
})
|
||||
|
||||
describe('headerDeltaCount', () => {
|
||||
|
||||
Reference in New Issue
Block a user