@@ -39,7 +39,9 @@ describe('UserLocation', () => {
3939 } ) ;
4040
4141 test ( 'renders with CircleLayers by default' , async ( ) => {
42- const { UNSAFE_getAllByType, UNSAFE_queryByType } = render ( < UserLocation /> ) ;
42+ const { UNSAFE_getAllByType, UNSAFE_queryByType } = render (
43+ < UserLocation /> ,
44+ ) ;
4345 await waitFor ( ( ) => {
4446 expect ( ( ) => UNSAFE_queryByType ( UserLocation ) ) . not . toThrow ( ) ;
4547 } ) ;
@@ -79,9 +81,9 @@ describe('UserLocation', () => {
7981
8082 const { UNSAFE_queryByType, UNSAFE_queryAllByType } = render (
8183 < UserLocation >
82- < CircleLayer key = ' testUserLocationCircle' { ...circleLayerProps } />
83- </ UserLocation >
84- )
84+ < CircleLayer key = " testUserLocationCircle" { ...circleLayerProps } />
85+ </ UserLocation > ,
86+ ) ;
8587 await waitFor ( ( ) => {
8688 expect ( ( ) => UNSAFE_queryByType ( UserLocation ) ) . not . toThrow ( ) ;
8789 } ) ;
@@ -99,7 +101,9 @@ describe('UserLocation', () => {
99101 test ( 'calls onUpdate callback when new location is received' , async ( ) => {
100102 const onUpdateCallback = jest . fn ( ) ;
101103
102- const { UNSAFE_getByType } = render ( < UserLocation onUpdate = { onUpdateCallback } /> ) ;
104+ const { UNSAFE_getByType } = render (
105+ < UserLocation onUpdate = { onUpdateCallback } /> ,
106+ ) ;
103107
104108 await waitFor ( ( ) => {
105109 expect ( ( ) => UNSAFE_getByType ( UserLocation ) ) . not . toThrow ( ) ;
@@ -118,7 +122,7 @@ describe('UserLocation', () => {
118122 } ,
119123 timestamp : 1573730357879 ,
120124 } ) ;
121- } )
125+ } ) ;
122126
123127 expect ( onUpdateCallback ) . toHaveBeenCalled ( ) ;
124128 } ) ;
@@ -152,7 +156,7 @@ describe('UserLocation', () => {
152156 const ul = UNSAFE_queryByType ( UserLocation ) ;
153157
154158 const lastKnownLocation = [ 4.1036916 , 51.5462244 ] ;
155- locationManager . _lastKnownLocation = lastKnownLocation
159+ locationManager . _lastKnownLocation = lastKnownLocation ;
156160
157161 expect ( locationManager . start ) . toHaveBeenCalledTimes ( 0 ) ;
158162 expect ( locationManager . _isListening ) . toStrictEqual ( false ) ;
@@ -219,13 +223,13 @@ describe('UserLocation', () => {
219223 test ( 'called with "running" true' , async ( ) => {
220224 const lastKnownLocation = [ 4.1036916 , 51.5462244 ] ;
221225 const heading = 251.5358428955078 ;
222- locationManager . _lastKnownLocation = lastKnownLocation
226+ locationManager . _lastKnownLocation = lastKnownLocation ;
223227
224228 expect ( ul . locationManagerRunning ) . toStrictEqual ( false ) ;
225229
226230 await act ( async ( ) => {
227231 await ul . setLocationManager ( { running : true } ) ;
228- } )
232+ } ) ;
229233
230234 expect ( ul . locationManagerRunning ) . toStrictEqual ( true ) ;
231235 expect ( locationManager . start ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -243,14 +247,14 @@ describe('UserLocation', () => {
243247 expect ( ul . locationManagerRunning ) . toStrictEqual ( false ) ;
244248 await act ( async ( ) => {
245249 await ul . setLocationManager ( { running : true } ) ;
246- } )
250+ } ) ;
247251
248252 expect ( ul . locationManagerRunning ) . toStrictEqual ( true ) ;
249253
250254 // stop
251255 await act ( async ( ) => {
252256 await ul . setLocationManager ( { running : false } ) ;
253- } )
257+ } ) ;
254258
255259 expect ( ul . locationManagerRunning ) . toStrictEqual ( false ) ;
256260 // only once from start
0 commit comments