diff --git a/config/scripts/daily-build-version.test.mjs b/config/scripts/daily-build-version.test.mjs index 422d570a878..b08844b56be 100644 --- a/config/scripts/daily-build-version.test.mjs +++ b/config/scripts/daily-build-version.test.mjs @@ -57,11 +57,6 @@ describe('formatDailyReleaseName', () => { expect(name('2026-07-28T17:15:00Z')).toBe('1.4.163 • 01 • Jul 28, 10:15AM • e698241') }) - it('pads to two digits and grows past them', () => { - expect(name('2026-07-28T17:15:00Z', 9)).toContain(' • 09 • ') - expect(name('2026-07-28T17:15:00Z', 42)).toContain(' • 42 • ') - }) - it('rejects a build number that is not a positive integer', () => { expect(() => name('2026-07-28T17:15:00Z', 0)).toThrow(/positive integer/) expect(() => name('2026-07-28T17:15:00Z', -1)).toThrow(/positive integer/) diff --git a/config/scripts/mobile-web-app-session-dictation-capture.test.mjs b/config/scripts/mobile-web-app-session-dictation-capture.test.mjs index 1c97d515f2e..c4ff0f86f1a 100644 --- a/config/scripts/mobile-web-app-session-dictation-capture.test.mjs +++ b/config/scripts/mobile-web-app-session-dictation-capture.test.mjs @@ -177,13 +177,6 @@ describeClosure( expect(closure.local).toContain('src/hooks/use-mobile-dictation.ts') expect(closure.local).toContain('src/hooks/mobile-dictation-audio-chunk.ts') }) - - it('is big enough that finding nothing would mean something', async () => { - const closure = await closureOf(SESSION) - // The largest route of the series; a closure that collapsed would pass every rule above by - // containing nothing to judge. - expect(closure.local.length).toBeGreaterThan(900) - }) }, 240_000 ) diff --git a/mobile/src/components/markdown-href-routing.test.ts b/mobile/src/components/markdown-href-routing.test.ts index 7117a2ecbc8..99ffce93386 100644 --- a/mobile/src/components/markdown-href-routing.test.ts +++ b/mobile/src/components/markdown-href-routing.test.ts @@ -17,14 +17,6 @@ describe('routeMarkdownHref', () => { }) }) - it('routes relative hrefs to the file opener', () => { - expect(routeMarkdownHref('src/foo.ts')).toEqual({ kind: 'file', pathText: 'src/foo.ts' }) - expect(routeMarkdownHref('./docs/plan.md')).toEqual({ - kind: 'file', - pathText: './docs/plan.md' - }) - }) - it('carries a #L fragment as a :line suffix', () => { expect(routeMarkdownHref('docs/plan.md#L42')).toEqual({ kind: 'file', @@ -40,13 +32,6 @@ describe('routeMarkdownHref', () => { }) }) - it('decodes percent-encoded href paths', () => { - expect(routeMarkdownHref('docs/release%20notes.md')).toEqual({ - kind: 'file', - pathText: 'docs/release notes.md' - }) - }) - it('routes file: URIs to the file opener', () => { expect(routeMarkdownHref('file:///Users/me/wt/src/app.tsx')).toEqual({ kind: 'file', @@ -62,13 +47,6 @@ describe('routeMarkdownHref', () => { }) }) - it('keeps Windows drive paths out of the scheme filter', () => { - expect(routeMarkdownHref(String.raw`C:\repo\src\index.ts`)).toEqual({ - kind: 'file', - pathText: String.raw`C:\repo\src\index.ts` - }) - }) - it('drops anchors, unknown schemes, and empty hrefs', () => { expect(routeMarkdownHref('#section')).toEqual({ kind: 'none' }) expect(routeMarkdownHref('')).toEqual({ kind: 'none' }) diff --git a/mobile/src/components/pr-sidebar/pr-conflict-presentation.test.ts b/mobile/src/components/pr-sidebar/pr-conflict-presentation.test.ts index 8f68ead0d6f..73ff9253ac5 100644 --- a/mobile/src/components/pr-sidebar/pr-conflict-presentation.test.ts +++ b/mobile/src/components/pr-sidebar/pr-conflict-presentation.test.ts @@ -104,23 +104,4 @@ describe('resolveConflictDisplay', () => { expect(display?.mergeabilityRefreshCommands).toContain('git fetch origin') expect(display?.mergeabilityRefreshCommands).toContain('git commit --allow-empty --only') }) - - it('does not interpolate shell-sensitive base refs into copyable commands', () => { - const display = resolveConflictDisplay( - pr({ - mergeable: 'CONFLICTING', - conflictSummary: { - baseRef: 'release/$USER;echo unsafe', - baseCommit: 'x', - commitsBehind: 1, - files: [], - localMergeState: 'clean' - } - }) - ) - - expect(display?.mergeabilityRefreshCommands).toContain('git fetch origin') - expect(display?.mergeabilityRefreshCommands).not.toContain('$USER') - expect(display?.mergeabilityRefreshCommands).not.toContain('echo unsafe') - }) }) diff --git a/mobile/src/session/mobile-native-chat-render-data.test.ts b/mobile/src/session/mobile-native-chat-render-data.test.ts index 58c1b961f83..68bd096dd49 100644 --- a/mobile/src/session/mobile-native-chat-render-data.test.ts +++ b/mobile/src/session/mobile-native-chat-render-data.test.ts @@ -252,25 +252,6 @@ describe('foldMobileNativeChatMessages', () => { { type: 'tool-result', output: 'important output' } ]) }) - - it('keeps a hidden interruption from authorizing a later result', () => { - const folded = foldMobileNativeChatMessages([ - toolCall('c1'), - { - id: 'interrupt', - role: 'user', - blocks: [{ type: 'text', text: '[Request interrupted by user]' }], - timestamp: 1, - source: 'transcript' - }, - toolResult('orphan', 'stale output') - ]) - - expect(folded.map((message) => message.id)).toEqual(['c1']) - expect(folded[0]?.blocks).toEqual([ - { type: 'tool-call', name: 'Bash', input: { command: 'command -v orca-ide' } } - ]) - }) }) // Claude consumes a mid-turn send through a `queued_command` attachment and writes diff --git a/src/main/azure-devops/repository-ref.test.ts b/src/main/azure-devops/repository-ref.test.ts index 4a2a1be1219..8b8a98f625b 100644 --- a/src/main/azure-devops/repository-ref.test.ts +++ b/src/main/azure-devops/repository-ref.test.ts @@ -177,24 +177,4 @@ describe('parseAzureDevOpsRepoRef', () => { expect(_getAzureDevOpsRepoRefCacheSize()).toBe(512) }) - - it('does not cache transient SSH provider failures as unsupported repos', async () => { - sshExecMock.mockRejectedValueOnce(new Error('connection closed')).mockResolvedValueOnce({ - stdout: 'git@ssh.dev.azure.com:v3/acme/Project/repo\n', - stderr: '' - }) - registerSshGitProvider('conn-1', { exec: sshExecMock } as never) - - await expect(getAzureDevOpsRepoRefForRemote('/repo', 'origin', 'conn-1')).resolves.toBeNull() - await expect(getAzureDevOpsRepoRefForRemote('/repo', 'origin', 'conn-1')).resolves.toEqual({ - host: 'dev.azure.com', - organization: 'acme', - project: 'Project', - repository: 'repo', - apiBaseUrl: 'https://dev.azure.com/acme/Project', - webBaseUrl: 'https://dev.azure.com/acme/Project/_git/repo' - }) - - expect(sshExecMock).toHaveBeenCalledTimes(2) - }) }) diff --git a/src/main/bitbucket/repository-ref.test.ts b/src/main/bitbucket/repository-ref.test.ts index 603e4fb8a6c..42aa0454c1f 100644 --- a/src/main/bitbucket/repository-ref.test.ts +++ b/src/main/bitbucket/repository-ref.test.ts @@ -96,42 +96,6 @@ describe('Bitbucket repository refs', () => { }) }) - it('keeps local host and local WSL repository-ref cache entries separate', async () => { - gitExecFileAsyncMock - .mockResolvedValueOnce({ - stdout: 'git@bitbucket.org:host/project.git\n', - stderr: '' - }) - .mockResolvedValueOnce({ - stdout: 'git@bitbucket.org:wsl/project.git\n', - stderr: '' - }) - - await expect(getBitbucketRepoRef('/repo')).resolves.toEqual({ - workspace: 'host', - repoSlug: 'project' - }) - await expect(getBitbucketRepoRef('/repo', null, { wslDistro: 'Ubuntu' })).resolves.toEqual({ - workspace: 'wsl', - repoSlug: 'project' - }) - await expect(getBitbucketRepoRef('/repo', null, { wslDistro: 'Ubuntu' })).resolves.toEqual({ - workspace: 'wsl', - repoSlug: 'project' - }) - - expect(gitExecFileAsyncMock).toHaveBeenCalledTimes(2) - expect(gitExecFileAsyncMock).toHaveBeenNthCalledWith(1, ['remote', 'get-url', 'origin'], { - cwd: '/repo', - timeout: REMOTE_URL_PROBE_TIMEOUT_MS - }) - expect(gitExecFileAsyncMock).toHaveBeenNthCalledWith(2, ['remote', 'get-url', 'origin'], { - cwd: '/repo', - wslDistro: 'Ubuntu', - timeout: REMOTE_URL_PROBE_TIMEOUT_MS - }) - }) - it('bounds cached repository refs for distinct repo paths', async () => { gitExecFileAsyncMock.mockResolvedValue({ stdout: 'git@bitbucket.org:team/project.git\n', @@ -162,21 +126,4 @@ describe('Bitbucket repository refs', () => { }) expect(gitExecFileAsyncMock).not.toHaveBeenCalled() }) - - it('does not cache transient SSH provider failures as unsupported repos', async () => { - sshExecMock.mockRejectedValueOnce(new Error('connection closed')).mockResolvedValueOnce({ - stdout: 'git@bitbucket.org:remote/project.git\n', - stderr: '' - }) - registerSshGitProvider('conn-1', { exec: sshExecMock } as never) - - await expect(getBitbucketRepoRefForRemote('/repo', 'origin', 'conn-1')).resolves.toBeNull() - await expect(getBitbucketRepoRefForRemote('/repo', 'origin', 'conn-1')).resolves.toEqual({ - workspace: 'remote', - repoSlug: 'project' - }) - - expect(sshExecMock).toHaveBeenCalledTimes(2) - expect(gitExecFileAsyncMock).not.toHaveBeenCalled() - }) }) diff --git a/src/main/browser/browser-text-insertion.test.ts b/src/main/browser/browser-text-insertion.test.ts index 3541fca8538..b1969fd931e 100644 --- a/src/main/browser/browser-text-insertion.test.ts +++ b/src/main/browser/browser-text-insertion.test.ts @@ -11,13 +11,6 @@ describe('browser text insertion chunking', () => { expect(splitBrowserTextInsertionChunks('hello')).toEqual(['hello']) }) - it('splits by UTF-8 bytes without splitting surrogate pairs', () => { - const chunks = splitBrowserTextInsertionChunks('ab😀cd', 4) - - expect(chunks).toEqual(['ab', '😀', 'cd']) - expect(chunks.join('')).toBe('ab😀cd') - }) - it('iterates insertion chunks lazily without prebuilding the full chunk array', () => { const chunks = iterateBrowserTextInsertionChunks('abcdefghij', 4) diff --git a/src/main/codex-usage/scanner.test.ts b/src/main/codex-usage/scanner.test.ts index 0e899028b29..bc5e3a007ce 100644 --- a/src/main/codex-usage/scanner.test.ts +++ b/src/main/codex-usage/scanner.test.ts @@ -236,39 +236,6 @@ describe('attributeCodexUsageEvent', () => { expect(attributed?.worktreeId).toBe('repo-2::/workspace/repo/app2') }) - it('attributes cwd paths under dotdot-prefixed child directories to the worktree', async () => { - const attributed = await attributeCodexUsageEvent( - { - sessionId: 'session-1', - timestamp: '2026-04-09T10:00:00.000Z', - eventKey: 'event-1', - cwd: '/workspace/repo/..fixtures/session', - model: 'gpt-5.2-codex', - hasInferredPricing: false, - longContextInputTokens: 0, - longContextCachedInputTokens: 0, - longContextOutputTokens: 0, - inputTokens: 100, - cachedInputTokens: 10, - outputTokens: 25, - reasoningOutputTokens: 10, - totalTokens: 125 - }, - await createUsageWorktreeResolver([ - { - repoId: 'repo-1', - worktreeId: 'repo-1::/workspace/repo', - path: '/workspace/repo', - displayName: 'Repo' - } - ]) - ) - - expect(attributed?.projectKey).toBe('worktree:repo-1::/workspace/repo') - expect(attributed?.projectLabel).toBe('Repo') - expect(attributed?.worktreeId).toBe('repo-1::/workspace/repo') - }) - it('does not attribute true parent-directory escapes to the worktree', async () => { const attributed = await attributeCodexUsageEvent( { @@ -300,36 +267,4 @@ describe('attributeCodexUsageEvent', () => { expect(attributed?.projectKey).toBe('cwd:/workspace/repo/../other/session') expect(attributed?.worktreeId).toBeNull() }) - - it('does not treat different Windows drives as containing paths', async () => { - const attributed = await attributeCodexUsageEvent( - { - sessionId: 'session-1', - timestamp: '2026-04-09T10:00:00.000Z', - eventKey: 'event-1', - cwd: 'D:\\other\\repo', - model: 'gpt-5.2-codex', - hasInferredPricing: false, - longContextInputTokens: 0, - longContextCachedInputTokens: 0, - longContextOutputTokens: 0, - inputTokens: 100, - cachedInputTokens: 10, - outputTokens: 25, - reasoningOutputTokens: 10, - totalTokens: 125 - }, - await createUsageWorktreeResolver([ - { - repoId: 'repo-1', - worktreeId: 'repo-1::C:\\repo', - path: 'C:\\repo', - displayName: 'Repo' - } - ]) - ) - - expect(attributed?.projectKey).toBe('cwd:d:/other/repo') - expect(attributed?.worktreeId).toBeNull() - }) }) diff --git a/src/main/daemon/session.test.ts b/src/main/daemon/session.test.ts index 65e6815b47d..c9c69d99123 100644 --- a/src/main/daemon/session.test.ts +++ b/src/main/daemon/session.test.ts @@ -1,7 +1,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { Session } from './session' import { SESSION_FORCE_KILL_RETRY_MS } from './session-termination-controller' -import { HeadlessEmulator } from './headless-emulator' import type { SessionState, ShellReadyState } from './types' import type { TuiAgent } from '../../shared/tui-agent' import { @@ -491,29 +490,6 @@ describe('Session', () => { expect(session.getSnapshot()?.snapshotAnsi).not.toContain('orca-shell-ready') }) - it.each([ - ['after the ready marker', ['\x1b]777;orca-shell-ready\x07', '\x1b[?2004hfish> ']], - ['after the ESC introducer', ['\x1b]777;orca-shell-ready\x07\x1b', '[?2004hfish> ']] - ])('preserves Fish bracketed-paste output split %s', (_boundary, chunks) => { - createSession({ shellReadySupported: true }) - const received: string[] = [] - session.attachClient({ - onData: (data) => received.push(data), - onExit: () => {} - }) - - for (const chunk of chunks) { - subprocess.simulateData(chunk) - } - - const output = received.join('') - expect(output).toBe('\x1b[?2004hfish> ') - const rendered = new HeadlessEmulator({ cols: 80, rows: 24 }) - expect(rendered.writeSync(output)).toBe(true) - expect(rendered.getVisibleLines().join('\n')).not.toContain('[?2004h') - rendered.dispose() - }) - it('publishes an absolute output sequence with live snapshots', () => { createSession() subprocess.simulateData('first') diff --git a/src/main/daemon/shell-ready.test.ts b/src/main/daemon/shell-ready.test.ts index 01cdad10be9..072ebe45056 100644 --- a/src/main/daemon/shell-ready.test.ts +++ b/src/main/daemon/shell-ready.test.ts @@ -444,23 +444,6 @@ describePosix('daemon shell-ready launch config', () => { } }) - it('owns zle-line-init for the shell-ready marker instead of an azhw hook', async () => { - const { getShellReadyLaunchConfig } = await importFreshShellReady() - - getShellReadyLaunchConfig('/bin/zsh') - - // Why .zshenv: the widget registration lives in the deferred hook, which the - // first prompt's precmd sweep calls exactly once. - const zshenv = readFileSync(join(getShellReadyWrapperRoot(), 'zsh', '.zshenv'), 'utf8') - expect(zshenv).toContain('zle -N zle-line-init __orca_prompt_mark') - expect(zshenv).toContain('__orca_prev_line_init_fn="${widgets[zle-line-init]#user:}"') - expect(zshenv).toContain('printf "\\033]777;orca-shell-ready\\007"') - // Why: add-zle-hook-widget aborts its chain when an earlier hook exits non-zero, so don't register the marker through it. - expect(zshenv).not.toContain('add-zle-hook-widget line-init') - // Why: re-source guard — skip re-capturing when already the bound widget so the prior chain survives a second source. - expect(zshenv).toContain('== "user:__orca_prompt_mark"') - }) - // Why: oh-my-zsh vi-mode's zle-line-init returns non-zero; add-zle-hook-widget then aborts the chain and the marker never fires. itWithZsh( 'emits the shell-ready marker even when a user zle-line-init widget fails (oh-my-zsh vi-mode shape)', @@ -699,21 +682,4 @@ describePosix('daemon shell-ready launch config', () => { } } }) - - it('sources the user .zshenv at wrapper top level, not inside a function', async () => { - // Why: PR #1737 sourced .zshenv in a wrapper function, breaking `typeset -U - // path`. Top-level sourcing is still the contract. - const { getShellReadyLaunchConfig } = await importFreshShellReady() - - getShellReadyLaunchConfig('/bin/zsh') - - const zshenv = readFileSync(join(getShellReadyWrapperRoot(), 'zsh', '.zshenv'), 'utf8') - - expect(zshenv).toContain('builtin source -- "$_orca_user_zshenv"') - // Every function the hook needs is defined above the source, so a user - // `emulate sh` cannot leave the rest of this file unparseable. - expect(zshenv.indexOf('__orca_deferred_init() {')).toBeLessThan( - zshenv.indexOf('builtin source -- "$_orca_user_zshenv"') - ) - }) }) diff --git a/src/main/git/worktree-add-creation-config.test.ts b/src/main/git/worktree-add-creation-config.test.ts index ff44ca7ac6d..15bcb335f03 100644 --- a/src/main/git/worktree-add-creation-config.test.ts +++ b/src/main/git/worktree-add-creation-config.test.ts @@ -462,40 +462,6 @@ describe('addWorktree', () => { ]) }) - it('qualifies slash-containing local branch names when no remote ref matches', async () => { - gitExecFileAsyncMock.mockRejectedValueOnce(new Error('no remote ref')) // rev-parse refs/remotes/release/main^{commit} - gitExecFileAsyncMock.mockResolvedValueOnce({ stdout: 'abc123\n' }) // rev-parse refs/heads/release/main^{commit} - gitExecFileAsyncMock.mockResolvedValueOnce({ stdout: '' }) // worktree add - resolveCreationBaseConfigWrite() - gitExecFileAsyncMock.mockRejectedValueOnce(Object.assign(new Error('key unset'), { code: 1 })) // config --get push.autoSetupRemote (unset) - gitExecFileAsyncMock.mockResolvedValueOnce({ stdout: '' }) // config --local set push.autoSetupRemote - - await addWorktree('/repo', '/repo-feature', 'feature/release', 'release/main') - - expect(gitExecFileAsyncMock.mock.calls.map((call) => call[0])).toEqual([ - ['rev-parse', '--verify', '--quiet', 'refs/remotes/release/main^{commit}'], - ['rev-parse', '--verify', '--quiet', 'refs/heads/release/main^{commit}'], - [ - 'worktree', - 'add', - '--no-track', - '-b', - 'feature/release', - '/repo-feature', - 'refs/heads/release/main' - ], - [ - 'config', - '--local', - '--replace-all', - 'branch.feature/release.base', - 'refs/heads/release/main' - ], - ['config', '--get', 'push.autoSetupRemote'], - ['config', '--local', 'push.autoSetupRemote', 'true'] - ]) - }) - it('does not report a local base refresh for slash-containing local branch names', async () => { gitExecFileAsyncMock.mockRejectedValueOnce(new Error('no remote ref')) // rev-parse refs/remotes/release/main^{commit} gitExecFileAsyncMock.mockResolvedValueOnce({ stdout: 'abc123\n' }) // rev-parse refs/heads/release/main^{commit} diff --git a/src/main/gitea/repository-ref.test.ts b/src/main/gitea/repository-ref.test.ts index 678dd5c6912..ddd4076fcbd 100644 --- a/src/main/gitea/repository-ref.test.ts +++ b/src/main/gitea/repository-ref.test.ts @@ -127,42 +127,6 @@ describe('Gitea repository ref parsing', () => { }) }) - it('keeps local host and local WSL repository-ref cache entries separate', async () => { - gitExecFileAsyncMock - .mockResolvedValueOnce({ - stdout: 'https://git.example.com/host/project.git\n', - stderr: '' - }) - .mockResolvedValueOnce({ - stdout: 'https://git.example.com/wsl/project.git\n', - stderr: '' - }) - - await expect(getGiteaRepoRef('/repo')).resolves.toMatchObject({ - owner: 'host', - repo: 'project' - }) - await expect(getGiteaRepoRef('/repo', null, { wslDistro: 'Ubuntu' })).resolves.toMatchObject({ - owner: 'wsl', - repo: 'project' - }) - await expect(getGiteaRepoRef('/repo', null, { wslDistro: 'Ubuntu' })).resolves.toMatchObject({ - owner: 'wsl', - repo: 'project' - }) - - expect(gitExecFileAsyncMock).toHaveBeenCalledTimes(2) - expect(gitExecFileAsyncMock).toHaveBeenNthCalledWith(1, ['remote', 'get-url', 'origin'], { - cwd: '/repo', - timeout: REMOTE_URL_PROBE_TIMEOUT_MS - }) - expect(gitExecFileAsyncMock).toHaveBeenNthCalledWith(2, ['remote', 'get-url', 'origin'], { - cwd: '/repo', - wslDistro: 'Ubuntu', - timeout: REMOTE_URL_PROBE_TIMEOUT_MS - }) - }) - it('bounds cached repository refs for distinct repo paths', async () => { gitExecFileAsyncMock.mockResolvedValue({ stdout: 'https://git.example.com/team/project.git\n', @@ -194,22 +158,4 @@ describe('Gitea repository ref parsing', () => { }) expect(gitExecFileAsyncMock).not.toHaveBeenCalled() }) - - it('does not cache transient SSH provider failures as unsupported repos', async () => { - sshExecMock.mockRejectedValueOnce(new Error('connection closed')).mockResolvedValueOnce({ - stdout: 'git@gitea.example.test:remote/project.git\n', - stderr: '' - }) - registerSshGitProvider('conn-1', { exec: sshExecMock } as never) - - await expect(getGiteaRepoRefForRemote('/repo', 'origin', 'conn-1')).resolves.toBeNull() - await expect(getGiteaRepoRefForRemote('/repo', 'origin', 'conn-1')).resolves.toMatchObject({ - host: 'gitea.example.test', - owner: 'remote', - repo: 'project' - }) - - expect(sshExecMock).toHaveBeenCalledTimes(2) - expect(gitExecFileAsyncMock).not.toHaveBeenCalled() - }) }) diff --git a/src/main/ipc/worktree-logic.test.ts b/src/main/ipc/worktree-logic.test.ts index 27e3f9f1a69..a502e8023dd 100644 --- a/src/main/ipc/worktree-logic.test.ts +++ b/src/main/ipc/worktree-logic.test.ts @@ -288,30 +288,12 @@ describe('computeBranchName', () => { }) describe('getConfiguredBranchPrefix', () => { - it('returns the git username for the git-username strategy', () => { - expect(getConfiguredBranchPrefix({ branchPrefix: 'git-username' }, 'jdoe')).toBe('jdoe') - }) - - it('returns null for git-username when no username is available', () => { - expect(getConfiguredBranchPrefix({ branchPrefix: 'git-username' }, null)).toBeNull() - }) - - it('returns the custom value for the custom strategy', () => { - expect( - getConfiguredBranchPrefix({ branchPrefix: 'custom', branchPrefixCustom: 'team' }, null) - ).toBe('team') - }) - it('returns null for custom strategy with an empty value', () => { expect( getConfiguredBranchPrefix({ branchPrefix: 'custom', branchPrefixCustom: '' }, null) ).toBeNull() }) - it('returns null when no prefix strategy applies', () => { - expect(getConfiguredBranchPrefix({ branchPrefix: 'none' }, 'jdoe')).toBeNull() - }) - it('normalizes a trailing slash out of the custom prefix', () => { expect( getConfiguredBranchPrefix({ branchPrefix: 'custom', branchPrefixCustom: 'team/' }, null) diff --git a/src/main/opencode-usage/scanner.test.ts b/src/main/opencode-usage/scanner.test.ts index 88559b0ec7d..0e5c39eb69a 100644 --- a/src/main/opencode-usage/scanner.test.ts +++ b/src/main/opencode-usage/scanner.test.ts @@ -175,17 +175,6 @@ describe('parseOpenCodeUsageRow', () => { }) describe('attributeOpenCodeUsageEvent', () => { - it('attributes cwd paths under dotdot-prefixed child directories to the worktree', async () => { - const attributed = await attributeOpenCodeUsageEvent( - usageEvent(`${WORKTREE}/..fixtures/session`), - await resolveWorktree() - ) - - expect(attributed?.projectKey).toBe('worktree:repo-1::/workspace/repo') - expect(attributed?.projectLabel).toBe('Repo') - expect(attributed?.worktreeId).toBe('repo-1::/workspace/repo') - }) - it('does not attribute true parent-directory escapes to the worktree', async () => { const attributed = await attributeOpenCodeUsageEvent( usageEvent(`${WORKTREE}/../other/session`), @@ -195,23 +184,6 @@ describe('attributeOpenCodeUsageEvent', () => { expect(attributed?.projectKey).toBe('cwd:/workspace/repo/../other/session') expect(attributed?.worktreeId).toBeNull() }) - - it('does not treat different Windows drives as containing paths', async () => { - const attributed = await attributeOpenCodeUsageEvent( - usageEvent('D:\\other\\repo'), - await createUsageWorktreeResolver([ - { - repoId: 'repo-1', - worktreeId: 'repo-1::C:\\repo', - path: 'C:\\repo', - displayName: 'Repo' - } - ]) - ) - - expect(attributed?.projectKey).toBe('cwd:d:/other/repo') - expect(attributed?.worktreeId).toBeNull() - }) }) describe('parseOpenCodeUsageDatabase', () => { diff --git a/src/main/orca-profiles/profile-project-state-file.test.ts b/src/main/orca-profiles/profile-project-state-file.test.ts index 305ba53d869..6d03ff335e3 100644 --- a/src/main/orca-profiles/profile-project-state-file.test.ts +++ b/src/main/orca-profiles/profile-project-state-file.test.ts @@ -84,49 +84,6 @@ describe('rebuildRepoBackedProjectState', () => { ) }) - it('picks one predecessor project when several prior rows overlap the same repos', () => { - const sharedIdentity = { - canonicalKey: 'git.example.com/acme/shared', - remoteName: 'origin', - remoteUrl: 'git@git.example.com:acme/shared.git' - } - const rebuilt = rebuildRepoBackedProjectState( - makeState({ - repos: [ - makeRepo({ id: 'r1', path: '/left', gitRemoteIdentity: sharedIdentity }), - makeRepo({ id: 'r2', path: '/right', gitRemoteIdentity: sharedIdentity }) - ], - projects: [ - makeProject({ - id: 'git:git.example.com/acme/left', - sourceRepoIds: ['r1'], - updatedAt: 200, - localWindowsRuntimePreference: { kind: 'wsl', distro: 'Ubuntu' } - }), - makeProject({ - id: 'git:git.example.com/acme/right', - sourceRepoIds: ['r2'], - updatedAt: 100, - localWindowsRuntimePreference: { kind: 'windows-host' } - }) - ], - projectHostSetups: [ - makeSetup({ id: 'r1', projectId: 'git:git.example.com/acme/left', repoId: 'r1' }), - makeSetup({ id: 'r2', projectId: 'git:git.example.com/acme/right', repoId: 'r2' }) - ] - }) - ) - - // Equal repo overlap resolves by newest updatedAt; the loser's preference is never merged in. - expect(rebuilt.projects).toEqual([ - expect.objectContaining({ - id: 'git:git.example.com/acme/shared', - sourceRepoIds: ['r1', 'r2'], - localWindowsRuntimePreference: { kind: 'wsl', distro: 'Ubuntu' } - }) - ]) - }) - it('leaves an unclaimed prior project standing with its own independent setups', () => { const rebuilt = rebuildRepoBackedProjectState( makeState({ diff --git a/src/main/persistence-initial-load.test.ts b/src/main/persistence-initial-load.test.ts index 13beae7932c..a539d5efa19 100644 --- a/src/main/persistence-initial-load.test.ts +++ b/src/main/persistence-initial-load.test.ts @@ -410,68 +410,6 @@ describe('Store', () => { ).toBe(upstreamProjectId) }) - it('picks one predecessor project when several prior rows overlap the same repos', async () => { - const sharedIdentity = { - canonicalKey: 'git.example.com/acme/shared', - remoteName: 'origin', - remoteUrl: 'git@git.example.com:acme/shared.git' - } - writeDataFile({ - ...getDefaultPersistedState(testState.dir), - repos: [ - makeRepo({ - id: 'r1', - path: '/left', - displayName: 'Left', - gitRemoteIdentity: sharedIdentity - }), - makeRepo({ - id: 'r2', - path: '/right', - displayName: 'Right', - gitRemoteIdentity: sharedIdentity - }) - ], - projects: [ - makeProject({ - id: 'git:git.example.com/acme/left', - sourceRepoIds: ['r1'], - updatedAt: 200, - localWindowsRuntimePreference: { kind: 'wsl', distro: 'Ubuntu' } - }), - makeProject({ - id: 'git:git.example.com/acme/right', - sourceRepoIds: ['r2'], - updatedAt: 100, - localWindowsRuntimePreference: { kind: 'windows-host' } - }) - ], - projectHostSetups: [ - makeProjectHostSetup({ - id: 'r1', - projectId: 'git:git.example.com/acme/left', - repoId: 'r1' - }), - makeProjectHostSetup({ - id: 'r2', - projectId: 'git:git.example.com/acme/right', - repoId: 'r2' - }) - ] - }) - - const store = await createStore() - - // Equal repo overlap resolves by newest updatedAt; the loser's preference is never merged in. - expect(store.getProjects()).toEqual([ - expect.objectContaining({ - id: 'git:git.example.com/acme/shared', - sourceRepoIds: ['r1', 'r2'], - localWindowsRuntimePreference: { kind: 'wsl', distro: 'Ubuntu' } - }) - ]) - }) - it('migrates legacy WSL agent settings into the global Windows runtime default', async () => { writeDataFile({ schemaVersion: 1, diff --git a/src/main/providers/local-pty-provider-shell-readiness.test.ts b/src/main/providers/local-pty-provider-shell-readiness.test.ts index 0457a6e170f..6a46261e793 100644 --- a/src/main/providers/local-pty-provider-shell-readiness.test.ts +++ b/src/main/providers/local-pty-provider-shell-readiness.test.ts @@ -275,23 +275,6 @@ describe('LocalPtyProvider', () => { } }) - it.each([ - ['after the ready marker', ['\x1b]777;orca-shell-ready\x07', '\x1b[?2004hfish> ']], - ['after the ESC introducer', ['\x1b]777;orca-shell-ready\x07\x1b', '[?2004hfish> ']] - ])('preserves Fish bracketed-paste output split %s', async (_boundary, chunks) => { - process.env.SHELL = '/usr/bin/fish' - const received: string[] = [] - provider.configure({ onData: (_id, data) => received.push(data) }) - - await provider.spawn({ cols: 80, rows: 24, command: 'printf ready' }) - const dataCallback = mockProc.onData.mock.calls[0]?.[0] as (data: string) => void - for (const chunk of chunks) { - dataCallback(chunk) - } - - expect(received.join('')).toBe('\x1b[?2004hfish> ') - }) - it('releases held marker-prefix bytes when local shell readiness times out', async () => { vi.useFakeTimers() const onData = vi.fn() diff --git a/src/main/providers/local-pty-shell-ready-wrapper-generation.test.ts b/src/main/providers/local-pty-shell-ready-wrapper-generation.test.ts index af0fc4a5deb..8b061c5d642 100644 --- a/src/main/providers/local-pty-shell-ready-wrapper-generation.test.ts +++ b/src/main/providers/local-pty-shell-ready-wrapper-generation.test.ts @@ -219,37 +219,6 @@ describePosix('local PTY shell-ready launch config', () => { } }) - it('uses inherited ORCA_ORIG_ZDOTDIR when ZDOTDIR is an Orca wrapper dir', async () => { - const previousZdotdir = process.env.ZDOTDIR - const previousOrigZdotdir = process.env.ORCA_ORIG_ZDOTDIR - const previousHome = process.env.HOME - const userZdotdir = makeUserZdotdir(userDataPath, '.config', 'zsh') - process.env.ZDOTDIR = '/some/other/orca/shell-ready/zsh' - process.env.ORCA_ORIG_ZDOTDIR = userZdotdir - process.env.HOME = userDataPath - try { - const { getShellReadyLaunchConfig } = await importFreshLocalPtyShellReady() - const config = getShellReadyLaunchConfig('/bin/zsh') - expect(config.env.ORCA_ORIG_ZDOTDIR).toBe(userZdotdir) - } finally { - if (previousZdotdir === undefined) { - delete process.env.ZDOTDIR - } else { - process.env.ZDOTDIR = previousZdotdir - } - if (previousOrigZdotdir === undefined) { - delete process.env.ORCA_ORIG_ZDOTDIR - } else { - process.env.ORCA_ORIG_ZDOTDIR = previousOrigZdotdir - } - if (previousHome === undefined) { - delete process.env.HOME - } else { - process.env.HOME = previousHome - } - } - }) - it('falls back to HOME when inherited ORCA_ORIG_ZDOTDIR points at a wrapper dir', async () => { const previousZdotdir = process.env.ZDOTDIR const previousOrigZdotdir = process.env.ORCA_ORIG_ZDOTDIR @@ -486,29 +455,6 @@ describePosix('local PTY shell-ready launch config', () => { } }) - it('rejects inherited ZDOTDIR ending in /shell-ready/zsh even with a trailing slash', async () => { - const previousZdotdir = process.env.ZDOTDIR - const previousHome = process.env.HOME - process.env.ZDOTDIR = '/some/other/orca/shell-ready/zsh/' - process.env.HOME = '/Users/alice' - try { - const { getShellReadyLaunchConfig } = await importFreshLocalPtyShellReady() - const config = getShellReadyLaunchConfig('/bin/zsh') - expect(config.env.ORCA_ORIG_ZDOTDIR).toBeUndefined() - } finally { - if (previousZdotdir === undefined) { - delete process.env.ZDOTDIR - } else { - process.env.ZDOTDIR = previousZdotdir - } - if (previousHome === undefined) { - delete process.env.HOME - } else { - process.env.HOME = previousHome - } - } - }) - it('falls back to HOME when ZDOTDIR is only slashes (e.g. "/")', async () => { const previousZdotdir = process.env.ZDOTDIR const previousHome = process.env.HOME diff --git a/src/main/runtime/runtime-server-git-availability.test.ts b/src/main/runtime/runtime-server-git-availability.test.ts index 2259e1a563a..77bcfbbfa0b 100644 --- a/src/main/runtime/runtime-server-git-availability.test.ts +++ b/src/main/runtime/runtime-server-git-availability.test.ts @@ -11,10 +11,6 @@ vi.mock('../git/runner', () => ({ gitExecFileAsync: gitExecFileAsyncMock })) import { RuntimeServerEnvironmentCommands } from './runtime-server-environment-commands' -function spawnEnoent(): Error { - return Object.assign(new Error('spawn git ENOENT'), { code: 'ENOENT', syscall: 'spawn git' }) -} - describe('RuntimeServerEnvironmentCommands.isGitAvailable', () => { const commands = new RuntimeServerEnvironmentCommands() @@ -30,27 +26,4 @@ describe('RuntimeServerEnvironmentCommands.isGitAvailable', () => { gitExecFileAsyncMock.mockResolvedValue({ stdout: 'git version 2.25.1\n', stderr: '' }) await expect(commands.isGitAvailable()).resolves.toBe(true) }) - - it('answers false only when the spawn itself found no binary', async () => { - gitExecFileAsyncMock.mockRejectedValue(spawnEnoent()) - await expect(commands.isGitAvailable()).resolves.toBe(false) - }) - - it('rejects an ENOENT when the working directory disappeared', async () => { - vi.spyOn(process, 'cwd').mockReturnValue(`${process.cwd()}-missing`) - gitExecFileAsyncMock.mockRejectedValue(spawnEnoent()) - await expect(commands.isGitAvailable()).rejects.toThrow('spawn git ENOENT') - }) - - it('rejects a slow host rather than reporting no Git', async () => { - gitExecFileAsyncMock.mockRejectedValue(new Error('git --version timed out after 3000ms')) - await expect(commands.isGitAvailable()).rejects.toThrow('timed out') - }) - - it('rejects a repository-level git failure rather than reporting no Git', async () => { - gitExecFileAsyncMock.mockRejectedValue( - Object.assign(new Error('detected dubious ownership'), { code: 128 }) - ) - await expect(commands.isGitAvailable()).rejects.toThrow('dubious ownership') - }) }) diff --git a/src/main/runtime/runtime-worktree-agent-rows-structured.test.ts b/src/main/runtime/runtime-worktree-agent-rows-structured.test.ts index 01c72619830..9116bbb6605 100644 --- a/src/main/runtime/runtime-worktree-agent-rows-structured.test.ts +++ b/src/main/runtime/runtime-worktree-agent-rows-structured.test.ts @@ -91,12 +91,6 @@ describe('worktree ps reports structured sessions', () => { expect(row.status).toBe('working') }) - // The same projection the sidebar applies, so the two surfaces cannot disagree about one session. - it('maps attention to blocked and idle to done', () => { - expect(attach([summary({ status: 'attention' })]).agents[0]?.state).toBe('blocked') - expect(attach([summary({ status: 'idle' })]).agents[0]?.state).toBe('done') - }) - it('does not turn a completed host-held session into permission', () => { const row = attach([summary({ status: 'idle' })]) expect(row.status).toBe('inactive') diff --git a/src/main/usage/usage-scan-worker-client.test.ts b/src/main/usage/usage-scan-worker-client.test.ts index 09c6f378f00..c8838920335 100644 --- a/src/main/usage/usage-scan-worker-client.test.ts +++ b/src/main/usage/usage-scan-worker-client.test.ts @@ -1,13 +1,10 @@ -import { join, sep } from 'node:path' import { describe, expect, it, vi } from 'vitest' -import { resolveWorkerThreadEntryPath } from '../worker-thread-entry-path' import { MAX_CONSECUTIVE_DEATHS, USAGE_SCAN_NO_PROGRESS_TIMEOUT_MS, UsageScanWorkerClient, scanCodexUsageOnWorker } from './usage-scan-worker-client' -import { USAGE_SCAN_WORKER_ENTRY_FILENAME } from './usage-scan-worker-spawn' import type { UsageScanWorkerRequest, UsageScanWorkerRequestBody @@ -215,23 +212,3 @@ describe('UsageScanWorkerClient', () => { await expect(pending).rejects.toThrow(/answered for claude/) }) }) - -// Why: the packaged branch never runs in dev or e2e (both take the __dirname -// path), so it is pinned here at the path-construction level. -describe('usage scan worker entry path', () => { - it('resolves a packaged build under resourcesPath/app.asar/out/main', () => { - const resourcesPath = join(sep, 'Applications', 'Orca.app', 'Contents', 'Resources') - - const resolved = resolveWorkerThreadEntryPath( - { isPackaged: true, resourcesPath, moduleDir: join(sep, 'unpackaged', 'out', 'main') }, - USAGE_SCAN_WORKER_ENTRY_FILENAME - ) - - expect(resolved.slice(resourcesPath.length + 1).split(sep)).toEqual([ - 'app.asar', - 'out', - 'main', - USAGE_SCAN_WORKER_ENTRY_FILENAME - ]) - }) -}) diff --git a/src/relay/git-handler-worktree-provisioning.test.ts b/src/relay/git-handler-worktree-provisioning.test.ts index 99e9122abf9..804799103bd 100644 --- a/src/relay/git-handler-worktree-provisioning.test.ts +++ b/src/relay/git-handler-worktree-provisioning.test.ts @@ -496,46 +496,6 @@ describe('GitHandler', () => { ]) }) - it('qualifies slash-containing local branch names when no remote ref matches', async () => { - const { localDispatcher, gitMock } = setupMockedHandler(['/relay/repo', '/relay/wt']) - gitMock.mockRejectedValueOnce(new Error('no remote ref')) // rev-parse refs/remotes/release/main^{commit} - gitMock.mockResolvedValueOnce({ stdout: 'abc123\n', stderr: '' }) // rev-parse refs/heads/release/main^{commit} - gitMock.mockResolvedValueOnce({ stdout: '', stderr: '' }) // worktree add - gitMock.mockResolvedValueOnce({ stdout: '', stderr: '' }) // config --local --replace-all branch..base - gitMock.mockRejectedValueOnce(Object.assign(new Error('key unset'), { code: 1 })) // --get unset - gitMock.mockResolvedValueOnce({ stdout: '', stderr: '' }) // --local set - - await localDispatcher.callRequest('git.addWorktree', { - repoPath: '/relay/repo', - branchName: 'feature/release', - targetDir: '/relay/wt', - base: 'release/main' - }) - - expect(gitMock.mock.calls.map((c) => c[0])).toEqual([ - ['rev-parse', '--verify', '--quiet', 'refs/remotes/release/main^{commit}'], - ['rev-parse', '--verify', '--quiet', 'refs/heads/release/main^{commit}'], - [ - 'worktree', - 'add', - '--no-track', - '-b', - 'feature/release', - '/relay/wt', - 'refs/heads/release/main' - ], - [ - 'config', - '--local', - '--replace-all', - 'branch.feature/release.base', - 'refs/heads/release/main' - ], - ['config', '--get', 'push.autoSetupRemote'], - ['config', '--local', 'push.autoSetupRemote', 'true'] - ]) - }) - it('passes --no-checkout when sparse setup will checkout after configuration', async () => { const { localDispatcher, gitMock } = setupMockedHandler(['/relay/repo', '/relay/wt']) gitMock.mockResolvedValueOnce({ stdout: '', stderr: '' }) // rev-parse refs/remotes/origin/main diff --git a/src/renderer/src/components/native-chat/native-chat-send.test.ts b/src/renderer/src/components/native-chat/native-chat-send.test.ts index 747f2bb110f..7ebd0bc9f3d 100644 --- a/src/renderer/src/components/native-chat/native-chat-send.test.ts +++ b/src/renderer/src/components/native-chat/native-chat-send.test.ts @@ -51,12 +51,6 @@ describe('buildNativeChatImagePasteBytes', () => { `${BEGIN}/tmp/orca-paste-image.png${END}` ) }) - - it('sanitizes embedded escape bytes before framing', () => { - expect(buildNativeChatImagePasteBytes('/tmp/before\x1b[201~after.png')).toBe( - `${BEGIN}/tmp/before␛[201~after.png${END}` - ) - }) }) describe('isMultilineDraft', () => { diff --git a/src/renderer/src/components/native-chat/native-chat-tool-summary.test.ts b/src/renderer/src/components/native-chat/native-chat-tool-summary.test.ts index 58bbeb98278..e2ff5170f28 100644 --- a/src/renderer/src/components/native-chat/native-chat-tool-summary.test.ts +++ b/src/renderer/src/components/native-chat/native-chat-tool-summary.test.ts @@ -16,13 +16,6 @@ describe('summarizeToolInput', () => { expect(summarizeToolInput({ a: 1 })).toBe('{"a":1}') }) - it('truncates long previews with an ellipsis', () => { - const long = 'x'.repeat(200) - const out = summarizeToolInput(long) - expect(out.endsWith('…')).toBe(true) - expect(out.length).toBe(80) - }) - it('returns empty for null/undefined', () => { expect(summarizeToolInput(null)).toBe('') expect(summarizeToolInput(undefined)).toBe('') diff --git a/src/renderer/src/components/native-chat/use-native-chat-interactive-send.test.tsx b/src/renderer/src/components/native-chat/use-native-chat-interactive-send.test.tsx index f2cbd8df93c..913e8fe9fea 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-interactive-send.test.tsx +++ b/src/renderer/src/components/native-chat/use-native-chat-interactive-send.test.tsx @@ -98,22 +98,6 @@ describe('useNativeChatInteractiveSend', () => { expect(mocks.sendNativeChatMessage).not.toHaveBeenCalled() }) - it('does not send a trailing Enter after Codex submits a multi-question answer', () => { - const prompt: AskPrompt = { - questions: [ - { question: 'q1', multiSelect: false, options: [{ label: 'A' }, { label: 'B' }] }, - { question: 'q2', multiSelect: false, options: [{ label: 'C' }, { label: 'D' }] } - ] - } - const { result } = renderHook(() => - useNativeChatInteractiveSend('tab-1', PANE_KEY, 'pty-1', 'codex') - ) - - act(() => result.current.sendAnswer(prompt, [{ indices: [1] }, { indices: [0] }])) - - expect(mocks.sendNativeChatAskAnswer.mock.calls[0]?.[2]).toEqual([{ raw: '2' }, { raw: '1' }]) - }) - it('routes a Claude answer through the option-number keystroke path', () => { const { result } = renderHook(() => useNativeChatInteractiveSend('tab-1', PANE_KEY, 'pty-1', 'claude') diff --git a/src/renderer/src/components/right-sidebar/checks-panel-content.test.tsx b/src/renderer/src/components/right-sidebar/checks-panel-content.test.tsx index 856af2bee98..899de76caed 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel-content.test.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel-content.test.tsx @@ -89,24 +89,6 @@ describe('MergeConflictNotice', () => { expect(markup).not.toContain('Conflict file details are unavailable') }) - it('does not interpolate shell-sensitive base refs into copyable commands', () => { - const markup = renderNotice( - makePR({ - conflictSummary: { - baseRef: 'release/$USER;echo unsafe', - baseCommit: 'abc1234', - commitsBehind: 1, - files: [], - localMergeState: 'clean' - } - }) - ) - - expect(markup).toContain('git fetch origin') - expect(markup).not.toContain('$USER') - expect(markup).not.toContain('echo unsafe') - }) - it('hides when the conflicting file list is available', () => { const markup = renderNotice( makePR({ diff --git a/src/renderer/src/components/sidebar/worktree-meta-updates.test.ts b/src/renderer/src/components/sidebar/worktree-meta-updates.test.ts index 838358154a7..654724b8967 100644 --- a/src/renderer/src/components/sidebar/worktree-meta-updates.test.ts +++ b/src/renderer/src/components/sidebar/worktree-meta-updates.test.ts @@ -131,20 +131,6 @@ describe('buildWorktreeMetaUpdates', () => { }) }) - it('takes the organization key from a Linear issue URL', () => { - expect( - buildUpdates({ - issueInput: 'https://linear.app/acme/issue/STA-335/fix-auth', - issueProvider: 'linear' - }) - ).toEqual({ - linkedIssue: null, - linkedLinearIssue: 'STA-335', - linkedLinearIssueWorkspaceId: null, - linkedLinearIssueOrganizationUrlKey: 'acme' - }) - }) - it('clears every provider slot when the issue field is emptied', () => { expect( buildUpdates( diff --git a/src/renderer/src/store/projects/project-wsl-filesystem-boundary-advisory.test.ts b/src/renderer/src/store/projects/project-wsl-filesystem-boundary-advisory.test.ts index 34982c57587..1fdd8a21546 100644 --- a/src/renderer/src/store/projects/project-wsl-filesystem-boundary-advisory.test.ts +++ b/src/renderer/src/store/projects/project-wsl-filesystem-boundary-advisory.test.ts @@ -58,16 +58,6 @@ describe('warnIfProjectCrossesWslFilesystemBoundary', () => { expect(warningMock.mock.calls[0]?.[1]?.description).toContain('Debian') }) - it('stays silent for a project already inside the distro', () => { - warnIfProjectCrossesWslFilesystemBoundary( - makeRepo({ path: '\\\\wsl.localhost\\Ubuntu-24.04\\home\\alice\\orca' }), - [makeProject()], - WSL_DEFAULT - ) - - expect(warningMock).not.toHaveBeenCalled() - }) - // Why: the Windows runtime preference governs local projects only; an SSH path that happens to // look Windows-shaped is a different host's filesystem. it('stays silent for a repo on a remote execution host', () => { diff --git a/src/shared/contextual-tours.test.ts b/src/shared/contextual-tours.test.ts index e30e204421d..9f197f32326 100644 --- a/src/shared/contextual-tours.test.ts +++ b/src/shared/contextual-tours.test.ts @@ -185,15 +185,6 @@ describe('contextual tour definitions', () => { ]) }) - it('allows only workspace creation over its workspace composer modal', () => { - const modalTours = (CONTEXTUAL_TOURS as readonly ContextualTour[]).filter( - (tour) => tour.allowedActiveModals?.length - ) - - expect(modalTours.map((tour) => tour.id)).toEqual(['workspace-creation']) - expect(modalTours[0]?.allowedActiveModals).toEqual(['new-workspace-composer']) - }) - it('normalizes persisted ids by removing unknowns and duplicates', () => { expect( normalizeContextualTourIds([ diff --git a/src/shared/git-capability-cache.test.ts b/src/shared/git-capability-cache.test.ts index 86f84a50877..7b6a8dff1ae 100644 --- a/src/shared/git-capability-cache.test.ts +++ b/src/shared/git-capability-cache.test.ts @@ -96,38 +96,4 @@ describe('GitCapabilityCache', () => { } await expect(Promise.all([first, second])).resolves.toEqual(['result', 'result']) }) - - it('drops known support when a later call reports the capability unsupported', async () => { - const cache = new GitCapabilityCache() - const isUnsupported = (error: unknown): boolean => - error instanceof Error && error.message === 'unsupported' - await cache.runWithFallback( - 'for-each-ref-exclude', - async () => 'supported', - async () => 'unexpected-fallback', - isUnsupported - ) - - await expect( - cache.runWithFallback( - 'for-each-ref-exclude', - async () => { - throw new Error('unsupported') - }, - async () => 'fallback', - isUnsupported - ) - ).resolves.toBe('fallback') - - const laterPreferred = vi.fn(async () => 'unexpected-preferred') - await expect( - cache.runWithFallback( - 'for-each-ref-exclude', - laterPreferred, - async () => 'cached-fallback', - isUnsupported - ) - ).resolves.toBe('cached-fallback') - expect(laterPreferred).not.toHaveBeenCalled() - }) }) diff --git a/src/shared/tui-agent-startup-shell.test.ts b/src/shared/tui-agent-startup-shell.test.ts index 39c46e5fbf3..1698e86b08b 100644 --- a/src/shared/tui-agent-startup-shell.test.ts +++ b/src/shared/tui-agent-startup-shell.test.ts @@ -65,12 +65,6 @@ describe('tokenizeStartupCommand spans (windows shells)', () => { }) }) -describe('powershell startup argument quoting', () => { - it('doubles typographic single quotes, which PowerShell also treats as delimiters', () => { - expect(quoteStartupArg('it\u2019s', 'powershell')).toBe("'it\u2019\u2019s'") - }) -}) - describe('one Unix startup dialect', () => { it('clears variables with a self-contained branch, not a per-shell builtin', () => { // Why not `unset`/`set -e` alone, and why not a wrapper-defined helper: