Open axel7083 opened 1 month ago
As per exposed by @benoitf in https://github.com/containers/podman-desktop-extension-ai-lab/pull/1849#discussion_r1795172109 we can simplify the tests by using a better manner which do not need the problematic vi.hoist (poor typing).
E.g.
vi.mock('../stores/modelsInfo', async () => ({ modelsInfo: { subscribe: vi.fn(), unsubscribe: vi.fn(), }, })); beforeEach(() => { const infos: Writable<ModelInfo[]> = writable([]); vi.mocked(modelsInfo).subscribe.mockImplementation((run) => (infos.subscribe(run))); });
No response
Is your enhancement related to a problem? Please describe
As per exposed by @benoitf in https://github.com/containers/podman-desktop-extension-ai-lab/pull/1849#discussion_r1795172109 we can simplify the tests by using a better manner which do not need the problematic vi.hoist (poor typing).
Describe the solution you'd like
E.g.
Describe alternatives you've considered
No response
Additional context
No response