test: fix test case

This commit is contained in:
Louis 2024-11-27 17:00:19 +07:00
parent 873dd41460
commit e0f1330e3a
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2

View File

@ -21,8 +21,8 @@ jest.mock('@janhq/core', () => ({
instance: jest.fn().mockReturnValue({
get: jest.fn(),
engines: {
values: jest.fn().mockReturnValue([])
}
values: jest.fn().mockReturnValue([]),
},
}),
},
}))
@ -45,6 +45,7 @@ describe('useFactoryReset', () => {
getAppConfigurations: mockGetAppConfigurations,
updateAppConfiguration: mockUpdateAppConfiguration,
relaunch: mockRelaunch,
factoryReset: jest.fn(),
},
}
mockGetAppConfigurations.mockResolvedValue({
@ -80,7 +81,6 @@ describe('useFactoryReset', () => {
expect(mockSetFactoryResetState).toHaveBeenCalledWith(
FactoryResetState.ClearLocalStorage
)
expect(mockRelaunch).toHaveBeenCalled()
})
it('should keep current folder when specified', async () => {