[Pkg-javascript-commits] [leaflet-markercluster] 418/479: Add distancegrid spec
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:01:03 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet-markercluster.
commit 81fa74b6db70b2213ce29b03452fc893160eacb2
Author: Tom MacWright <tom at macwright.org>
Date: Tue Sep 17 18:49:48 2013 -0400
Add distancegrid spec
---
spec/suites/DistanceGridSpec.js | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/spec/suites/DistanceGridSpec.js b/spec/suites/DistanceGridSpec.js
new file mode 100644
index 0000000..118dbec
--- /dev/null
+++ b/spec/suites/DistanceGridSpec.js
@@ -0,0 +1,21 @@
+describe('distance grid', function () {
+ it('addObject', function () {
+ var grid = new L.DistanceGrid(100),
+ obj = {};
+
+ expect(grid.addObject(obj, { x: 0, y: 0 })).to.eql(undefined);
+ expect(grid.removeObject(obj, { x: 0, y: 0 })).to.eql(true);
+ });
+
+ it('eachObject', function (done) {
+ var grid = new L.DistanceGrid(100),
+ obj = {};
+
+ expect(grid.addObject(obj, { x: 0, y: 0 })).to.eql(undefined);
+
+ grid.eachObject(function(o) {
+ expect(o).to.eql(obj);
+ done();
+ });
+ });
+});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git
More information about the Pkg-javascript-commits
mailing list