0.0.13 • Published 7 years ago

chai-leaflet v0.0.13

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

chai-leaflet

Chai assertions to test Leaflet apps.

Usage

In the browser, just add <script src="chai-leaflet.js"></script> after including chai. Now you can write tests like this:

chai.should();

it('example', function () {
	latlng.should.be.near([51, 4]);

	map.should.have.view([33, 2], 4);

	map.should.have.zoom(18);
});

Because chai-leaflet depends on a global L it does not work out of the box on node.js. You may use leaflet-headless to work around that.

var L = require('leaflet-headless');
var chai = require('chai');
chai.use(require('chai-leaflet'));

chai = chai.should();

// your tests here
0.0.13

7 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.3

11 years ago

0.0.2

11 years ago