angular-leaflet-directive
Version:
angular-leaflet-directive - An AngularJS directive to easily interact with Leaflet maps
20 lines (14 loc) • 541 B
text/coffeescript
window.ngLeafLetTestGlobals = {}
beforeEach ->
angular.module('leaflet-directive')
.config ($provide) ->
$provide.value('$log', console)
$provide.decorator '$timeout', ($delegate, $browser) ->
$delegate.hasPendingTasks = ->
$browser.deferredFns.length > 0
$delegate
@digest = (scope, fn) ->
while ngLeafLetTestGlobals.$timeout.hasPendingTasks()
ngLeafLetTestGlobals.$timeout.flush()
fn() if fn?
scope.$digest() unless scope.$$phase