fake-geolocation
    Preparing search index...

    Function createLocationServices

    • Create a virtual location services API.

      Parameters

      • params: { acquireDelay?: number } = {}

        The parameters for creating the virtual location services API.

        • OptionalacquireDelay?: number

          An optional delay in milliseconds to wait for all coordinates to be acquired.

          If a number is provided, all calls to LocationServices.acquireCoordinates will wait for this number of milliseconds via setTimeout before returning the coordinates. If omitted, no timeout will be used.

          This is useful for simulating a delay in acquiring coordinates, which in the real world never happens instantly. Adding a delay can make your tests more realistic, but can result in slower tests, and introduce issues when fake timers are used.

          undefined

      Returns MutableLocationServices

      A virtual location services API.