• Public
  • Public/Protected
  • All

Module core/testing



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

    Resets the Glean singleton to its initial state and re-initializes it.

    Note: There is no way to only allow this function to be called in test mode, because this is the function that puts Glean in test mode by setting Context.testing to true.


    • 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.

    • clearStores: boolean = true

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

    Returns Promise<void>

Generated using TypeDoc