MCPcopy Index your code
hub / github.com/angular/components / createPolygonSpy

Function createPolygonSpy

src/google-maps/testing/fake-google-map-utils.ts:277–294  ·  view source on GitHub ↗
(
  options: google.maps.PolygonOptions,
)

Source from the content-addressed store, hash-verified

275
276/** Creates a jasmine.SpyObj for a google.maps.Polygon */
277export function createPolygonSpy(
278 options: google.maps.PolygonOptions,
279): jasmine.SpyObj<google.maps.Polygon> {
280 const polygonSpy = jasmine.createSpyObj('google.maps.Polygon', [
281 'addListener',
282 'getDraggable',
283 'getEditable',
284 'getPath',
285 'getPaths',
286 'getVisible',
287 'setMap',
288 'setOptions',
289 'setPath',
290 'setPaths',
291 ]);
292 polygonSpy.addListener.and.returnValue({remove: () => {}});
293 return polygonSpy;
294}
295
296/** Creates a jasmine.Spy to watch for the constructor of a google.maps.Polygon */
297export function createPolygonConstructorSpy(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…