it('needsTokenForPrivate', () => { const showNotificationStub = jest.fn(); showNotification.mockImplementation(showNotificationStub); needsTokenForPrivate(); expect(showNotificationStub.mock.calls[0][0]).toMatchSnapshot(); });
it('for unauthenticated requests', () => { const showNotificationStub = jest.fn(); showNotification.mockImplementation(showNotificationStub); rateLimitExceeded({ isUnauthenticated: true, remainingTime: 300000 }); expect(showNotificationStub.mock.calls[0][0]).toMatchSnapshot(); });
it('tokenIsInvalid', () => { const showNotificationStub = jest.fn(); showNotification.mockImplementation(showNotificationStub); tokenIsInvalid(); expect(showNotificationStub.mock.calls[0][0]).toMatchSnapshot(); });