Commit c4ac09f
test(core): cover empty-cumulative + finish_reason path + rename duplicate
Two follow-ups from wenshao's 2026-05-09 review:
1. Add coverage for the `normalizedContent || choice.finish_reason` guard
on the content path in cumulative mode. All prior cumulative tests use
`finish_reason: null`, so the empty-normalized + non-null finish_reason
path was untested. Establishes cumulative mode, then sends an exact-
repeat final chunk with `finish_reason: 'stop'`; asserts the empty
normalized delta does not emit spurious text but `finishReason` still
propagates through to the candidate.
2. Rename the second cumulative-reasoning_content test (line 2162) to
clarify its distinct scenario — multi-line accumulation where the
emitted suffix itself begins with a newline. The previous name was
confusingly similar to the test at line 2006 (single-line cumulative
reasoning), making it unclear what each uniquely covered.
97 → 98 tests; lint clean.
Generated with AI
Co-authored-by: Qwen-Coder <[email protected]>1 parent d132acb commit c4ac09f
1 file changed
Lines changed: 87 additions & 1 deletion
Lines changed: 87 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2159 | 2159 | | |
2160 | 2160 | | |
2161 | 2161 | | |
2162 | | - | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
2163 | 2167 | | |
2164 | 2168 | | |
2165 | 2169 | | |
| |||
2530 | 2534 | | |
2531 | 2535 | | |
2532 | 2536 | | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
2533 | 2619 | | |
2534 | 2620 | | |
2535 | 2621 | | |
| |||
0 commit comments