@@ -4,15 +4,15 @@ import { AzureMapsContext } from '../../contexts/AzureMapContext'
44import AzureMap from './AzureMap'
55import { Map } from 'azure-maps-control'
66import { IAzureMap , IAzureMapsContextProps } from '../../types'
7- import { useCreateImageSprites } from './useCreateSprites'
8- import { useCreateMapCustomControls , useCreateMapControls } from './useCreateMapControls'
7+ import { createImageSprites } from './useCreateSprites'
8+ import { createMapCustomControls , createMapControls } from './useCreateMapControls'
99
1010const LoaderComponent = ( ) => < div > Loader</ div >
1111
1212jest . mock ( './useCreateMapControls' , ( ) => {
1313 return {
14- useCreateMapCustomControls : jest . fn ( ) ,
15- useCreateMapControls : jest . fn ( )
14+ createMapCustomControls : jest . fn ( ) ,
15+ createMapControls : jest . fn ( )
1616 }
1717} )
1818
@@ -108,25 +108,25 @@ describe('AzureMap Component', () => {
108108 expect ( mapContextProps . removeMapRef ) . toHaveBeenCalled ( )
109109 } )
110110
111- it ( 'should call useCreateImageSprites if imageSprites is not falsy' , ( ) => {
111+ it ( 'should call createImageSprites if imageSprites is not falsy' , ( ) => {
112112 const mapRef = new Map ( 'fake' , { } )
113113 render (
114114 wrapWithAzureMapContext (
115115 { ...mapContextProps , mapRef } ,
116116 { imageSprites : [ { id : 'some_fake_id' } ] }
117117 )
118118 )
119- expect ( useCreateImageSprites ) . toHaveBeenCalled ( )
119+ expect ( createImageSprites ) . toHaveBeenCalled ( )
120120 } )
121121
122- it ( 'should call useCreateMapControls if controls is not falsy' , ( ) => {
122+ it ( 'should call createMapControls if controls is not falsy' , ( ) => {
123123 const mapRef = new Map ( 'fake' , { } )
124124 const fakeControls = [ { controlName : 'fake_control_name' } ]
125125 render ( wrapWithAzureMapContext ( { ...mapContextProps , mapRef } , { controls : fakeControls } ) )
126- expect ( useCreateMapControls ) . toHaveBeenCalledWith ( expect . any ( Object ) , fakeControls )
126+ expect ( createMapControls ) . toHaveBeenCalledWith ( expect . any ( Object ) , fakeControls )
127127 } )
128128
129- it ( 'should call useCreateMapCustomControls if customControls is not falsy' , ( ) => {
129+ it ( 'should call createMapCustomControls if customControls is not falsy' , ( ) => {
130130 const mapRef = new Map ( 'fake' , { } )
131131 const customControls = [
132132 {
@@ -142,7 +142,7 @@ describe('AzureMap Component', () => {
142142 }
143143 )
144144 )
145- expect ( useCreateMapCustomControls ) . toHaveBeenCalledWith ( expect . any ( Object ) , customControls )
145+ expect ( createMapCustomControls ) . toHaveBeenCalledWith ( expect . any ( Object ) , customControls )
146146 } )
147147
148148 it ( 'should setTraffic on initial props' , ( ) => {
0 commit comments