1
This commit is contained in:
@@ -142,12 +142,7 @@ describe('apiClient', () => {
|
||||
}),
|
||||
}),
|
||||
);
|
||||
expect(dispatchEventMock).toHaveBeenCalledTimes(1);
|
||||
expect(dispatchEventMock).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
type: AUTH_STATE_EVENT,
|
||||
}),
|
||||
);
|
||||
expect(dispatchEventMock).not.toHaveBeenCalled();
|
||||
expect(getStoredAccessToken()).toBe('fresh-token');
|
||||
});
|
||||
|
||||
@@ -277,7 +272,7 @@ describe('apiClient', () => {
|
||||
expect(response.status).toBe(401);
|
||||
expect(fetchMock).toHaveBeenCalledTimes(3);
|
||||
expect(getStoredAccessToken()).toBe('fresh-token');
|
||||
expect(dispatchEventMock).toHaveBeenCalledTimes(1);
|
||||
expect(dispatchEventMock).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('rejects refresh responses that do not return a renewed bearer token', async () => {
|
||||
|
||||
Reference in New Issue
Block a user