mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 09:37:37 +08:00
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:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user