Unit test error mapController.addObject
idrenski opened this issue · 0 comments
IMPORTANT:
When I try to do unit test of directive <cic-locate-me></cic-locate-me>
directive text:
<custom-control id="home" position="TOP_RIGHT" index="2"> <md-button class="md-fab md-mini md-primary" aria-label="Use Home Location" ng-click="vm.showHomeLocation()"> <md-icon md-svg-src="img/home-white.svg"></md-icon> </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 error TypeError: null is not an object (evaluating 'mapController.addObject') in bower_components/ngmap/build/scripts/ng-map.js (line 438)
when I call directive to test var compilationData = suite.ElementHelpers.compileElement("<cic-locate-me></cic-locate-me>", "cicLocateMe");
Steps to reproduce and a minimal demo(Plunker Example)
- What steps should we try in your demo to see the problem?
Current behavior
Expected/desired behavior
Other information