fix(test): move orphaned test into describe block

Move "clears loading flag when all mutations idle" test inside
the describe("useProviderActions") block for proper test isolation.
This commit is contained in:
YoVinchen
2026-01-30 00:11:11 +08:00
parent 06cde78945
commit b8a53f9e36
3 changed files with 21 additions and 21 deletions
+12 -11
View File
@@ -450,17 +450,18 @@ describe("useProviderActions", () => {
expect(result.current.isLoading).toBe(true);
});
});
it("clears loading flag when all mutations idle", () => {
addProviderMutation.isPending = false;
updateProviderMutation.isPending = false;
deleteProviderMutation.isPending = false;
switchProviderMutation.isPending = false;
const { wrapper } = createWrapper();
const { result } = renderHook(() => useProviderActions("claude"), {
wrapper,
it("clears loading flag when all mutations idle", () => {
addProviderMutation.isPending = false;
updateProviderMutation.isPending = false;
deleteProviderMutation.isPending = false;
switchProviderMutation.isPending = false;
const { wrapper } = createWrapper();
const { result } = renderHook(() => useProviderActions("claude"), {
wrapper,
});
expect(result.current.isLoading).toBe(false);
});
expect(result.current.isLoading).toBe(false);
});