(options: google.maps.MapOptions)
| 50 | |
| 51 | /** Creates a jasmine.SpyObj for a google.maps.Map. */ |
| 52 | export function createMapSpy(options: google.maps.MapOptions): jasmine.SpyObj<google.maps.Map> { |
| 53 | const mapSpy = jasmine.createSpyObj('google.maps.Map', [ |
| 54 | 'setOptions', |
| 55 | 'setCenter', |
| 56 | 'setZoom', |
| 57 | 'setMap', |
| 58 | 'addListener', |
| 59 | 'fitBounds', |
| 60 | 'panBy', |
| 61 | 'panTo', |
| 62 | 'panToBounds', |
| 63 | 'getBounds', |
| 64 | 'getCenter', |
| 65 | 'getClickableIcons', |
| 66 | 'getHeading', |
| 67 | 'getMapTypeId', |
| 68 | 'getProjection', |
| 69 | 'getStreetView', |
| 70 | 'getTilt', |
| 71 | 'getZoom', |
| 72 | 'setMapTypeId', |
| 73 | ]); |
| 74 | mapSpy.addListener.and.returnValue({remove: () => {}}); |
| 75 | return mapSpy; |
| 76 | } |
| 77 | |
| 78 | /** Creates a jasmine.Spy to watch for the constructor of a google.maps.Map. */ |
| 79 | export function createMapConstructorSpy( |
no outgoing calls
no test coverage detected
searching dependent graphs…