diff --git a/src/drawing/advanced-marker-element/advanced-marker-element.test.ts b/src/drawing/advanced-marker-element/advanced-marker-element.test.ts index b211808f..e3f7a299 100644 --- a/src/drawing/advanced-marker-element/advanced-marker-element.test.ts +++ b/src/drawing/advanced-marker-element/advanced-marker-element.test.ts @@ -42,4 +42,6 @@ test("registers mocks", () => { }); expect(mockInstances.get(AdvancedMarkerElement)[0].title).toBe("Howdy"); + + expect(mockInstances.get(AdvancedMarkerElement)[0].element).toBeDefined(); }); diff --git a/src/drawing/advanced-marker-element/advanced-marker-element.ts b/src/drawing/advanced-marker-element/advanced-marker-element.ts index fd17683f..9753eab1 100644 --- a/src/drawing/advanced-marker-element/advanced-marker-element.ts +++ b/src/drawing/advanced-marker-element/advanced-marker-element.ts @@ -49,6 +49,9 @@ export class AdvancedMarkerElement constructor(options?: google.maps.marker.AdvancedMarkerElementOptions) { super(); + + this.element = document.createElement("div"); + __registerMockInstance(this.constructor, this); } }