test: fix test case
This commit is contained in:
parent
873dd41460
commit
e0f1330e3a
@ -21,8 +21,8 @@ jest.mock('@janhq/core', () => ({
|
|||||||
instance: jest.fn().mockReturnValue({
|
instance: jest.fn().mockReturnValue({
|
||||||
get: jest.fn(),
|
get: jest.fn(),
|
||||||
engines: {
|
engines: {
|
||||||
values: jest.fn().mockReturnValue([])
|
values: jest.fn().mockReturnValue([]),
|
||||||
}
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
@ -45,6 +45,7 @@ describe('useFactoryReset', () => {
|
|||||||
getAppConfigurations: mockGetAppConfigurations,
|
getAppConfigurations: mockGetAppConfigurations,
|
||||||
updateAppConfiguration: mockUpdateAppConfiguration,
|
updateAppConfiguration: mockUpdateAppConfiguration,
|
||||||
relaunch: mockRelaunch,
|
relaunch: mockRelaunch,
|
||||||
|
factoryReset: jest.fn(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
mockGetAppConfigurations.mockResolvedValue({
|
mockGetAppConfigurations.mockResolvedValue({
|
||||||
@ -80,7 +81,6 @@ describe('useFactoryReset', () => {
|
|||||||
expect(mockSetFactoryResetState).toHaveBeenCalledWith(
|
expect(mockSetFactoryResetState).toHaveBeenCalledWith(
|
||||||
FactoryResetState.ClearLocalStorage
|
FactoryResetState.ClearLocalStorage
|
||||||
)
|
)
|
||||||
expect(mockRelaunch).toHaveBeenCalled()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should keep current folder when specified', async () => {
|
it('should keep current folder when specified', async () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user