fix(test): correct the worktree types import path and drop an unused parameter

This commit is contained in:
Neil
2026-09-04 04:38:25 -07:00
parent cefff10e10
commit 79df2bf8be
2 changed files with 5 additions and 5 deletions
@@ -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
@@ -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()
})
})