Class: MockAnalyticsService

Analytics.MockAnalyticsService()

The MockAnalyticsService implements all functions of AnalyticsService as Jest mocks (jest.fn())). It emulates the behavior of a real analytics service but witohut making any requests. It has no other functionality.

Constructor

new MockAnalyticsService()

Implements:
  • AnalyticsService
Source:

Members

identifyAnonymousUser

No-op, but records that it has been called to prevent double-identification.

Source:

identifyAuthenticatedUser

No-op, but records that identify has been called.

Source:

sendPageEvent

Logs the event to the console.

Checks whether identify has been called, logging an error to the logging service if not.

Source:

sendTrackEvent

Logs the event to the console.

Checks whether identify has been called, logging an error to the logging service if not.

Source:

sendTrackingLogEvent

Returns a resolved promise.

Source: