mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-01 05:00:13 +00:00
chore: update test file
This commit is contained in:
parent
34cc128d1a
commit
746064aebe
6 changed files with 475 additions and 352 deletions
|
|
@ -360,51 +360,4 @@ describe('useInstallationSetup Hook', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('Console Logging', () => {
|
||||
it('should log installation status check', async () => {
|
||||
const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {})
|
||||
|
||||
renderHook(() => useInstallationSetup())
|
||||
|
||||
await vi.waitFor(() => {
|
||||
expect(consoleLogSpy).toHaveBeenCalledWith(
|
||||
'[useInstallationSetup] Installation status check:',
|
||||
expect.any(Object)
|
||||
)
|
||||
})
|
||||
|
||||
consoleLogSpy.mockRestore()
|
||||
})
|
||||
|
||||
it('should log when installation listeners are registered', () => {
|
||||
const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {})
|
||||
|
||||
renderHook(() => useInstallationSetup())
|
||||
|
||||
expect(consoleLogSpy).toHaveBeenCalledWith(
|
||||
'[useInstallationSetup] Installation listeners registered'
|
||||
)
|
||||
|
||||
consoleLogSpy.mockRestore()
|
||||
})
|
||||
|
||||
it('should log install complete events', () => {
|
||||
const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {})
|
||||
|
||||
renderHook(() => useInstallationSetup())
|
||||
|
||||
const completeCallback = electronAPI.onInstallDependenciesComplete.mock.calls[0][0]
|
||||
|
||||
act(() => {
|
||||
completeCallback({ success: true })
|
||||
})
|
||||
|
||||
expect(consoleLogSpy).toHaveBeenCalledWith(
|
||||
'[useInstallationSetup] Install complete event received:',
|
||||
{ success: true }
|
||||
)
|
||||
|
||||
consoleLogSpy.mockRestore()
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue