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