2013-11-08 05:54:33 +08:00
|
|
|
describe('L#noConflict', function () {
|
|
|
|
it('restores the previous L value and returns Leaflet namespace', function () {
|
2013-02-05 23:00:38 +08:00
|
|
|
|
2013-03-02 05:49:20 +08:00
|
|
|
expect(L.version).to.be.ok();
|
2013-02-05 23:00:38 +08:00
|
|
|
|
2010-09-04 00:49:32 +08:00
|
|
|
var L2 = L.noConflict();
|
2012-06-25 08:16:46 +08:00
|
|
|
|
2013-03-02 05:49:20 +08:00
|
|
|
expect(L).to.eql('test');
|
|
|
|
expect(L2.version).to.be.ok();
|
2013-02-05 23:00:38 +08:00
|
|
|
|
|
|
|
window.L = L2;
|
2010-09-04 00:49:32 +08:00
|
|
|
});
|
2013-02-05 23:00:38 +08:00
|
|
|
});
|