Skip to content

Commit 4e7c129

Browse files
committed
test(daemon): keep the three over-budget test files at their base length
Splitting `daemon/types.ts` turns one combined import into two in every file that used both halves. Three of those test files are already over the 1,000-line tripwire, where the size ratchet allows no growth, so each sheds one line that was carrying nothing: - `snapshot-handler.test.ts` and `find.test.ts` each drop a `toHaveLength` assertion an adjacent `toEqual` on an explicit array literal already makes. - `session-replay-repair-transaction.test.ts` names the filtered close actions instead of wrapping the expression across three lines inside `expect`. No assertion is weakened and no test content is removed. Splitting these files along the modules they mirror is the standing remedy, but none of those modules split here, so it stays out of this change and is tracked in #2353. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ujrc8LYmvM249WY8921J1Y
1 parent 84120ca commit 4e7c129

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

‎src/daemon/handlers/__tests__/snapshot-handler.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ function assertAndroidTimeoutEvidencePayload(evidence: unknown) {
169169
expect(record.path).toEqual(expect.stringContaining('snapshot-timeout-overlay-refs.png'));
170170
expect(fs.existsSync(record.path as string)).toBe(true);
171171
expect(record.overlayRefsAnnotated).toBe(true);
172-
expect(record.overlayRefs).toHaveLength(1);
173172
expect(record.overlayRefs).toEqual([expect.objectContaining({ ref: 'e1', label: 'Continue' })]);
174173
}
175174

‎src/daemon/interaction/internal/__tests__/find.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,6 @@ test('handleFindCommands ambiguous match lists snapshot-line candidates capped a
533533
expect(response.error.details?.matches).toBe(6);
534534
const candidates = response.error.details?.candidates;
535535
expect(Array.isArray(candidates)).toBe(true);
536-
expect(candidates).toHaveLength(5);
537536
expect(candidates).toEqual([
538537
'@e2 [button] "Follow"',
539538
'@e3 [button] "Follow"',

‎src/daemon/replay/internal/__tests__/session-replay-repair-transaction.test.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,8 @@ test('BLOCKER 2b/2c: a close whose commit FAILS (no-clobber) keeps the session f
537537
expect(fs.readFileSync(path.join(root, 'flow.healed.ad'), 'utf8')).toBe(before);
538538
// The rolled-back finalize `close` did not linger, so a retry does not
539539
// accumulate a duplicate `close` in the healed slice.
540-
expect(sessionStore.get(sessionName)!.actions.filter((a) => a.command === 'close')).toHaveLength(
541-
0,
542-
);
540+
const closeActions = sessionStore.get(sessionName)!.actions.filter((a) => a.command === 'close');
541+
expect(closeActions).toHaveLength(0);
543542

544543
// Retry with an explicit path commits cleanly — exactly ONE terminal close.
545544
const retryPath = path.join(root, 'flow.promoted.ad');

0 commit comments

Comments
 (0)