2010-09-04 00:49:32 +08:00
|
|
|
describe('L#noConflict', function() {
|
|
|
|
it('should restore the previous L value and return Leaflet namespace', function(){
|
|
|
|
|
2012-06-25 08:16:46 +08:00
|
|
|
expect(L.version).toBeDefined();
|
2010-09-04 00:49:32 +08:00
|
|
|
|
|
|
|
var L2 = L.noConflict();
|
2012-06-25 08:16:46 +08:00
|
|
|
this.after(function () {
|
2010-09-04 00:49:32 +08:00
|
|
|
window.L = L2;
|
|
|
|
});
|
2012-06-25 08:16:46 +08:00
|
|
|
|
|
|
|
expect(L).toEqual('test');
|
|
|
|
expect(L2.version).toBeDefined();
|
2010-09-04 00:49:32 +08:00
|
|
|
});
|
|
|
|
});
|