Options
All
  • Public
  • Public/Protected
  • All
Menu

Module core/testing/utils

Index

Functions

  • testInitializeGlean(applicationId: string, uploadEnabled?: boolean, config?: ConfigurationInterface): Promise<void>
  • Test-only API

    Initializes Glean in testing mode.

    All platform specific APIs will be mocked.

    Parameters

    • applicationId: string

      The application ID (will be sanitized during initialization).

    • uploadEnabled: boolean = true

      Determines whether telemetry is enabled. If disabled, all persisted metrics, events and queued pings (except first_run_date) are cleared. Default to true.

    • Optional config: ConfigurationInterface

      Glean configuration options.

    Returns Promise<void>

  • testUninitializeGlean(clearStores?: boolean): Promise<void>
  • Test-only API

    Resets Glean to an uninitialized state. This is a no-op in case Glean has not been initialized.

    Parameters

    • clearStores: boolean = true

      Whether or not to clear the events, metrics and pings databases on uninitialize.

    Returns Promise<void>

Generated using TypeDoc