mirror of
https://github.com/stablyai/orca.git
synced 2026-10-09 08:02:35 +00:00
test: restore codex hook cleanup warn spy
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
committed by
Neil
co-authored by
Orca
parent
cb136952c9
commit
61cee02438
@@ -687,12 +687,16 @@ describe('CodexHookService', () => {
|
||||
)
|
||||
const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {})
|
||||
|
||||
expect(new CodexHookService().install().state).toBe('installed')
|
||||
try {
|
||||
expect(new CodexHookService().install().state).toBe('installed')
|
||||
|
||||
expect(warnSpy).not.toHaveBeenCalledWith(
|
||||
'[codex-hook-service] failed to clean legacy Codex hooks',
|
||||
expect.anything()
|
||||
)
|
||||
expect(warnSpy).not.toHaveBeenCalledWith(
|
||||
'[codex-hook-service] failed to clean legacy Codex hooks',
|
||||
expect.anything()
|
||||
)
|
||||
} finally {
|
||||
warnSpy.mockRestore()
|
||||
}
|
||||
const systemHooks = JSON.parse(readFileSync(systemHooksPath, 'utf-8')) as {
|
||||
hooks: Record<string, unknown>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user