コード例 #1
0
  it('needsTokenForPrivate', () => {
    const showNotificationStub = jest.fn();
    showNotification.mockImplementation(showNotificationStub);

    needsTokenForPrivate();
    expect(showNotificationStub.mock.calls[0][0]).toMatchSnapshot();
  });
コード例 #2
0
    it('for unauthenticated requests', () => {
      const showNotificationStub = jest.fn();
      showNotification.mockImplementation(showNotificationStub);

      rateLimitExceeded({ isUnauthenticated: true, remainingTime: 300000 });
      expect(showNotificationStub.mock.calls[0][0]).toMatchSnapshot();
    });
コード例 #3
0
  it('tokenIsInvalid', () => {
    const showNotificationStub = jest.fn();
    showNotification.mockImplementation(showNotificationStub);

    tokenIsInvalid();
    expect(showNotificationStub.mock.calls[0][0]).toMatchSnapshot();
  });