test: add isFetching to mock return values
All checks were successful
CI / ci (push) Successful in 2m59s
All checks were successful
CI / ci (push) Successful in 2m59s
This commit is contained in:
parent
2d671669d4
commit
af135d5640
@ -56,6 +56,7 @@ function mockUseBrokerPositions(...positions: BrokerPosition[]) {
|
|||||||
asOf: '2026-06-17T00:00:00.000Z',
|
asOf: '2026-06-17T00:00:00.000Z',
|
||||||
},
|
},
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isFetching: false,
|
||||||
error: null,
|
error: null,
|
||||||
} as any;
|
} as any;
|
||||||
});
|
});
|
||||||
@ -83,6 +84,7 @@ describe('Broker pages', () => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isFetching: false,
|
||||||
error: null,
|
error: null,
|
||||||
} as any);
|
} as any);
|
||||||
|
|
||||||
@ -110,6 +112,7 @@ describe('Broker pages', () => {
|
|||||||
asOf: '2026-06-16T00:00:00.000Z',
|
asOf: '2026-06-16T00:00:00.000Z',
|
||||||
},
|
},
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isFetching: false,
|
||||||
error: null,
|
error: null,
|
||||||
} as any);
|
} as any);
|
||||||
vi.spyOn(operationsHook, 'useBrokerOperations').mockReturnValue({
|
vi.spyOn(operationsHook, 'useBrokerOperations').mockReturnValue({
|
||||||
@ -145,6 +148,7 @@ describe('Broker pages', () => {
|
|||||||
asOf: '2026-06-16T00:00:00.000Z',
|
asOf: '2026-06-16T00:00:00.000Z',
|
||||||
},
|
},
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isFetching: false,
|
||||||
error: null,
|
error: null,
|
||||||
} as any);
|
} as any);
|
||||||
mockUseBrokerPositions(
|
mockUseBrokerPositions(
|
||||||
@ -188,6 +192,7 @@ describe('Broker pages', () => {
|
|||||||
asOf: '2026-06-17T00:00:00.000Z',
|
asOf: '2026-06-17T00:00:00.000Z',
|
||||||
},
|
},
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isFetching: false,
|
||||||
error: null,
|
error: null,
|
||||||
} as any);
|
} as any);
|
||||||
vi.spyOn(operationsHook, 'useBrokerOperations').mockReturnValue({
|
vi.spyOn(operationsHook, 'useBrokerOperations').mockReturnValue({
|
||||||
@ -199,6 +204,7 @@ describe('Broker pages', () => {
|
|||||||
asOf: '2026-06-17T00:00:00.000Z',
|
asOf: '2026-06-17T00:00:00.000Z',
|
||||||
},
|
},
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isFetching: false,
|
||||||
error: null,
|
error: null,
|
||||||
} as any);
|
} as any);
|
||||||
mockUseBrokerPositions(
|
mockUseBrokerPositions(
|
||||||
@ -264,6 +270,7 @@ describe('Broker pages', () => {
|
|||||||
asOf: '2026-06-17T00:00:00.000Z',
|
asOf: '2026-06-17T00:00:00.000Z',
|
||||||
},
|
},
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isFetching: false,
|
||||||
error: null,
|
error: null,
|
||||||
} as any);
|
} as any);
|
||||||
vi.spyOn(operationsHook, 'useBrokerOperations').mockReturnValue({
|
vi.spyOn(operationsHook, 'useBrokerOperations').mockReturnValue({
|
||||||
@ -322,6 +329,7 @@ describe('Broker pages', () => {
|
|||||||
asOf: '2026-06-17T00:00:00.000Z',
|
asOf: '2026-06-17T00:00:00.000Z',
|
||||||
},
|
},
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isFetching: false,
|
||||||
error: null,
|
error: null,
|
||||||
} as any);
|
} as any);
|
||||||
mockUseBrokerPositions();
|
mockUseBrokerPositions();
|
||||||
@ -361,6 +369,7 @@ describe('Broker pages', () => {
|
|||||||
asOf: '2026-06-17T00:00:00.000Z',
|
asOf: '2026-06-17T00:00:00.000Z',
|
||||||
},
|
},
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isFetching: false,
|
||||||
error: null,
|
error: null,
|
||||||
} as any);
|
} as any);
|
||||||
const operationsSpy = vi.spyOn(operationsHook, 'useBrokerOperations').mockImplementation(
|
const operationsSpy = vi.spyOn(operationsHook, 'useBrokerOperations').mockImplementation(
|
||||||
@ -431,6 +440,7 @@ describe('Broker pages', () => {
|
|||||||
asOf: '2026-06-17T00:00:00.000Z',
|
asOf: '2026-06-17T00:00:00.000Z',
|
||||||
},
|
},
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isFetching: false,
|
||||||
error: null,
|
error: null,
|
||||||
}) as any,
|
}) as any,
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user