mirror of
https://github.com/stablyai/orca.git
synced 2026-11-02 10:08:13 +00:00
test: remove low-value inventories, passthroughs and redundant cases (#33796)
* test: remove low-value inventories, passthroughs and redundant cases * style: format test suites after pruning redundant cases * test: remove obsolete workflow and flaky-test references * test: prune deleted builder test from Windows shim allowlist --------- Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
const { refreshV1, refreshV2 } = vi.hoisted(() => ({
|
||||
refreshV1: vi.fn<() => void>(),
|
||||
refreshV2: vi.fn<() => void>()
|
||||
}))
|
||||
vi.mock('./hook-service', () => ({
|
||||
openCodeHookService: { refreshInstalledPlugins: refreshV1 },
|
||||
openCode2HookService: { refreshInstalledPlugins: refreshV2 }
|
||||
}))
|
||||
|
||||
import { refreshInstalledOpenCodeStatusPlugins } from './opencode-status-plugin-startup-refresh'
|
||||
|
||||
describe('refreshInstalledOpenCodeStatusPlugins', () => {
|
||||
beforeEach(() => {
|
||||
refreshV1.mockClear()
|
||||
refreshV2.mockClear()
|
||||
})
|
||||
|
||||
it('refreshes both variants by default', () => {
|
||||
refreshInstalledOpenCodeStatusPlugins(null)
|
||||
expect(refreshV1).toHaveBeenCalledTimes(1)
|
||||
expect(refreshV2).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
|
||||
it('touches nothing while agent status hooks are off', () => {
|
||||
refreshInstalledOpenCodeStatusPlugins({ agentStatusHooksEnabled: false })
|
||||
expect(refreshV1).not.toHaveBeenCalled()
|
||||
expect(refreshV2).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('skips a disabled variant only', () => {
|
||||
refreshInstalledOpenCodeStatusPlugins({ disabledTuiAgents: ['opencode2'] })
|
||||
expect(refreshV1).toHaveBeenCalledTimes(1)
|
||||
expect(refreshV2).not.toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user