@@ -90,11 +90,11 @@ test.skip('HeatmapLayer#updates', t => {
9090 onAfterUpdate ( { layer, subLayers, spies} ) {
9191 expect ( subLayers . length === 1 , 'Sublayer rendered' ) . toBeTruthy ( ) ;
9292
93- expect ( spies . _updateColorTexture . called , 'should update color texture' ) . toBeTruthy ( ) ;
93+ expect ( spies . _updateColorTexture , 'should update color texture' ) . toHaveBeenCalled ( ) ;
9494 expect (
95- spies . _updateBounds . called ,
95+ spies . _updateBounds ,
9696 'viewport not changed, should not call _updateBounds'
97- ) . toBeFalsy ( ) ;
97+ ) . not . toHaveBeenCalled ( ) ;
9898 spies . _updateColorTexture . restore ( ) ;
9999 spies . _updateBounds . restore ( ) ;
100100 }
@@ -109,19 +109,22 @@ test.skip('HeatmapLayer#updates', t => {
109109 ] ,
110110 onAfterUpdate ( { layer, subLayers, spies} ) {
111111 const { zoom} = layer . state ;
112- expect ( spies . _updateColorTexture . called , 'should not update color texture' ) . toBeFalsy ( ) ;
113112 expect (
114- spies . _updateBounds . called ,
113+ spies . _updateColorTexture ,
114+ 'should not update color texture'
115+ ) . not . toHaveBeenCalled ( ) ;
116+ expect (
117+ spies . _updateBounds ,
115118 'viewport changed, should call _updateBounds'
116- ) . toBeTruthy ( ) ;
119+ ) . toHaveBeenCalled ( ) ;
117120 expect (
118- spies . _updateWeightmap . called ,
121+ spies . _updateWeightmap ,
119122 'boundsChanged changed, should _updateWeightmap'
120- ) . toBeTruthy ( ) ;
123+ ) . toHaveBeenCalled ( ) ;
121124 expect (
122- spies . _updateTextureRenderingBounds . called ,
125+ spies . _updateTextureRenderingBounds ,
123126 'vieport changed, should call _updateTextureRenderingBounds'
124- ) . toBeTruthy ( ) ;
127+ ) . toHaveBeenCalled ( ) ;
125128 expect ( zoom , 'should update state.zoom' ) . toBe ( viewport1 . zoom ) ;
126129 spies . _updateColorTexture . restore ( ) ;
127130 spies . _updateBounds . restore ( ) ;
@@ -134,17 +137,17 @@ test.skip('HeatmapLayer#updates', t => {
134137 spies : [ '_updateBounds' , '_updateWeightmap' , '_updateTextureRenderingBounds' ] ,
135138 onAfterUpdate ( { layer, subLayers, spies} ) {
136139 expect (
137- spies . _updateBounds . called ,
140+ spies . _updateBounds ,
138141 'viewport changed slightly, should call _updateBounds'
139- ) . toBeTruthy ( ) ;
142+ ) . toHaveBeenCalled ( ) ;
140143 expect (
141- spies . _updateWeightmap . called ,
144+ spies . _updateWeightmap ,
142145 'viewport changed slightly, should not call _updateWeightmap'
143- ) . toBeFalsy ( ) ;
146+ ) . not . toHaveBeenCalled ( ) ;
144147 expect (
145- spies . _updateTextureRenderingBounds . called ,
148+ spies . _updateTextureRenderingBounds ,
146149 'viewport changed slightly, should call _updateTextureRenderingBounds'
147- ) . toBeTruthy ( ) ;
150+ ) . toHaveBeenCalled ( ) ;
148151 spies . _updateBounds . restore ( ) ;
149152 spies . _updateWeightmap . restore ( ) ;
150153 spies . _updateTextureRenderingBounds . restore ( ) ;
@@ -155,13 +158,13 @@ test.skip('HeatmapLayer#updates', t => {
155158 spies : [ '_updateBounds' , '_updateWeightmap' ] ,
156159 onAfterUpdate ( { layer, subLayers, spies} ) {
157160 expect (
158- spies . _updateBounds . called ,
161+ spies . _updateBounds ,
159162 'viewport panned too far, should call _updateBounds'
160- ) . toBeTruthy ( ) ;
163+ ) . toHaveBeenCalled ( ) ;
161164 expect (
162- spies . _updateWeightmap . called ,
165+ spies . _updateWeightmap ,
163166 'viewport panned too far, should call _updateWeightmap'
164- ) . toBeTruthy ( ) ;
167+ ) . toHaveBeenCalled ( ) ;
165168 spies . _updateBounds . restore ( ) ;
166169 spies . _updateWeightmap . restore ( ) ;
167170 }
@@ -172,13 +175,13 @@ test.skip('HeatmapLayer#updates', t => {
172175 onAfterUpdate ( { layer, subLayers, spies} ) {
173176 const { zoom} = layer . state ;
174177 expect (
175- spies . _updateBounds . called ,
178+ spies . _updateBounds ,
176179 'viewport zoom changed, should call _updateBounds'
177- ) . toBeTruthy ( ) ;
180+ ) . toHaveBeenCalled ( ) ;
178181 expect (
179- spies . _debouncedUpdateWeightmap . called ,
182+ spies . _debouncedUpdateWeightmap ,
180183 'viewport zoom changed, should call _debouncedUpdateWeightmap'
181- ) . toBeTruthy ( ) ;
184+ ) . toHaveBeenCalled ( ) ;
182185 spies . _updateBounds . restore ( ) ;
183186 spies . _debouncedUpdateWeightmap . restore ( ) ;
184187 expect ( zoom , 'viewport zoom changed, should update state.zoom' ) . toBe (
@@ -194,9 +197,9 @@ test.skip('HeatmapLayer#updates', t => {
194197 spies : [ '_updateWeightmap' ] ,
195198 onAfterUpdate ( { layer, subLayers, spies} ) {
196199 expect (
197- spies . _updateWeightmap . called ,
200+ spies . _updateWeightmap ,
198201 'should update weight map on uniform change'
199- ) . toBeTruthy ( ) ;
202+ ) . toHaveBeenCalled ( ) ;
200203 spies . _updateWeightmap . restore ( ) ;
201204 }
202205 }
0 commit comments