import { describe, expect, it } from 'vitest' import { getLocalhostWorktreeRouteKey } from './localhost-worktree-labels' describe('localhost worktree labels', () => { it('keeps route keys unique for different ports in the same worktree', () => { const route = { projectName: 'Snap Studio', worktreeName: 'analytics', repoId: 'repo-1', worktreeId: 'wt-analytics' } expect( getLocalhostWorktreeRouteKey({ ...route, targetUrl: 'http://localhost:5173/' }) ).not.toBe( getLocalhostWorktreeRouteKey({ ...route, targetUrl: 'http://localhost:7777/' }) ) }) })