fix: add non-null assertions for parseUnitId optional fields in tests
parseUnitId returns { milestone, slice?, task? } where slice and task are
optional. Test code that knows these fields are present needs ! assertions
to satisfy strict TypeScript checking.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bfce186fee
commit
6c6de6aa2d
2 changed files with 2 additions and 2 deletions
|
|
@ -447,7 +447,7 @@ test("unitId batch encoding round-trips correctly", () => {
|
|||
assert.equal(slice, "S01");
|
||||
const plusIdx = batchPart!.indexOf("+");
|
||||
assert.ok(plusIdx > 0, "Should have + separator");
|
||||
const batchIds = batchPart.slice(plusIdx + 1).split(",");
|
||||
const batchIds = batchPart!.slice(plusIdx + 1).split(",");
|
||||
assert.deepEqual(batchIds, ["T02", "T03", "T05"]);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ test('Retry reset: idempotent when artifacts already missing', () => {
|
|||
const { milestone: mid, slice: sid, task: tid } = parseUnitId(trigger.unitId);
|
||||
|
||||
// Uncheck — returns false because no PLAN file
|
||||
const uncheckResult = uncheckTaskInPlan(base, mid, sid, tid);
|
||||
const uncheckResult = uncheckTaskInPlan(base, mid, sid!, tid!);
|
||||
assert.ok(!uncheckResult, "uncheck returns false when no PLAN exists");
|
||||
|
||||
// Summary does not exist — no crash
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue