From 79df2bf8be59e84c67e163695d0c3a38c81d8afb Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Fri, 4 Sep 2026 04:38:25 -0700 Subject: [PATCH] fix(test): correct the worktree types import path and drop an unused parameter --- .../sidebar/worktree-list/grouping/host-labels.test.ts | 2 +- src/shared/worktree/host-context-labels.test.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/components/sidebar/worktree-list/grouping/host-labels.test.ts b/src/renderer/src/components/sidebar/worktree-list/grouping/host-labels.test.ts index da40bf5cb6f..7411dc00d6a 100644 --- a/src/renderer/src/components/sidebar/worktree-list/grouping/host-labels.test.ts +++ b/src/renderer/src/components/sidebar/worktree-list/grouping/host-labels.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest' import type { ExecutionHostId } from '../../../../../../shared/execution-host' import type { Repo } from '../../../../../../shared/repo-types' -import type { Worktree } from '../../../../../../shared/worktree-types' +import type { Worktree } from '../../../../../../shared/worktree/types' import { getHostWorktreeCounts, getHostWorktreeIds } from './host-labels' const LOCAL = 'local' as ExecutionHostId diff --git a/src/shared/worktree/host-context-labels.test.ts b/src/shared/worktree/host-context-labels.test.ts index 21523822ebe..ccea06a25ed 100644 --- a/src/shared/worktree/host-context-labels.test.ts +++ b/src/shared/worktree/host-context-labels.test.ts @@ -4,7 +4,7 @@ import { getMixedHostContextLabels } from './host-context-labels' type Item = { id: string; hostId: ExecutionHostId } -function argsFor(items: Item[], counters: { hostIdReads: number; identityReads: number }) { +function argsFor(counters: { hostIdReads: number; identityReads: number }) { return { getHostId: (item: Item): ExecutionHostId => { counters.hostIdReads += 1 @@ -25,7 +25,7 @@ describe('getMixedHostContextLabels', () => { })) const counters = { hostIdReads: 0, identityReads: 0 } - expect(getMixedHostContextLabels(items, argsFor(items, counters))).toBeUndefined() + expect(getMixedHostContextLabels(items, argsFor(counters))).toBeUndefined() // The label map was built for all 50 and thrown away before; now nothing is built. expect(counters.identityReads).toBe(0) }) @@ -38,7 +38,7 @@ describe('getMixedHostContextLabels', () => { })) const counters = { hostIdReads: 0, identityReads: 0 } - const labels = getMixedHostContextLabels(items, argsFor(items, counters)) + const labels = getMixedHostContextLabels(items, argsFor(counters)) expect(labels, `second host at index ${lateIndex}`).toBeDefined() expect(labels?.size).toBe(50) @@ -48,6 +48,6 @@ describe('getMixedHostContextLabels', () => { it('returns undefined for an empty list', () => { const counters = { hostIdReads: 0, identityReads: 0 } - expect(getMixedHostContextLabels([], argsFor([], counters))).toBeUndefined() + expect(getMixedHostContextLabels([], argsFor(counters))).toBeUndefined() }) })