allenhwkim / angularjs-google-maps

The Simplest AngularJS Google Maps V3 Directive
http://ngmap.github.io
MIT License
1.52k stars 517 forks source link

Unit test error mapController.addObject #837

Open idrenski opened 7 years ago

idrenski commented 7 years ago

IMPORTANT:

When I try to do unit test of directive <cic-locate-me></cic-locate-me> directive text: ` <md-button class="md-fab md-mini md-primary" aria-label="Use Home Location" ng-click="vm.showHomeLocation()">

    </md-button>
</custom-control>
<custom-control id="current" position="TOP_RIGHT" index="1">
    <md-button class="md-fab md-mini md-primary" aria-label="Use Current Location"
               ng-click="vm.showCurrentLocation()">
        <md-icon md-svg-src="img/currentLocation-white.svg"></md-icon>
    </md-button>
</custom-control>

I get an errorTypeError: null is not an object (evaluating 'mapController.addObject') in bower_components/ngmap/build/scripts/ng-map.js (line 438)when I call directive to testvar compilationData = suite.ElementHelpers.compileElement("", "cicLocateMe");`

Steps to reproduce and a minimal demo(Plunker Example)

Current behavior

Expected/desired behavior

Other information