mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 00:50:05 +00:00
test: use double-cast pattern for partial Settings mock
Replace direct Settings cast with explicit double-cast pattern (Partial<Settings> as Settings) to make it clear the mock is intentionally incomplete.
This commit is contained in:
@@ -46,7 +46,9 @@ describe('useSettingStore', () => {
|
||||
describe('loadSettingValues', () => {
|
||||
it('should load settings from API', async () => {
|
||||
const mockSettings = { 'test.setting': 'value' }
|
||||
vi.mocked(api.getSettings).mockResolvedValue(mockSettings as Settings)
|
||||
vi.mocked(api.getSettings).mockResolvedValue(
|
||||
mockSettings as Partial<Settings> as Settings
|
||||
)
|
||||
|
||||
await store.loadSettingValues()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user