mohsen-angular-leaflet-directive
Version:
angular-leaflet-directive - An AngularJS directive to easily interact with Leaflet maps
47 lines (37 loc) • 1.15 kB
JavaScript
// Generated by CoffeeScript 1.10.0
(function() {
describe('leafletIterators', function() {
beforeEach(function() {
module('leaflet-directive');
return inject(function(_$compile_, _$rootScope_, _leafletData_, _leafletIterators_) {
this.$compile = _$compile_;
this.$rootScope = _$rootScope_;
this.leafletData = _leafletData_;
return this.subject = _leafletIterators_;
});
});
it('exists', function() {
return expect(this.subject).toBeDefined();
});
return describe('forEach/each', function() {
return it('prototypes should not be called', function() {
var d;
var vals;
var Dummy = (function() {
function Dummy() {}
Dummy.prototype.prop1 = 'prop1';
Dummy.prototype.prop2 = 'prop2';
return Dummy;
})();
d = new Dummy();
d.prop3 = 'prop3';
vals = [];
this.subject.each(d, function(val) {
return vals.push(val);
});
expect(vals.length).toBe(1);
return expect(vals[0]).toBe(d.prop3);
});
});
});
}).call(this);