fix up KML tests
This commit is contained in:
committed by
ahocevar
parent
33dd188f9b
commit
a4ceb41938
@@ -52,8 +52,8 @@ describe('ol.parser.kml', function() {
|
|||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var p = new ol.parser.KML({maxDepth: 1});
|
var p = new ol.parser.KML({maxDepth: 1});
|
||||||
// we need to supply a callback to get visited NetworkLinks
|
// we need to supply a callback to get visited NetworkLinks
|
||||||
p.read(xml, function(features) {
|
p.read(xml, function(obj) {
|
||||||
expect(features.length).to.eql(3);
|
expect(obj.features.length).to.eql(3);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -63,8 +63,8 @@ describe('ol.parser.kml', function() {
|
|||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var p = new ol.parser.KML({maxDepth: 2});
|
var p = new ol.parser.KML({maxDepth: 2});
|
||||||
// we need to supply a callback to get visited NetworkLinks
|
// we need to supply a callback to get visited NetworkLinks
|
||||||
p.read(xml, function(features) {
|
p.read(xml, function(obj) {
|
||||||
expect(features.length).to.eql(2);
|
expect(obj.features.length).to.eql(2);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -74,9 +74,9 @@ describe('ol.parser.kml', function() {
|
|||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var p = new ol.parser.KML({maxDepth: 1});
|
var p = new ol.parser.KML({maxDepth: 1});
|
||||||
// we need to supply a callback to get visited NetworkLinks
|
// we need to supply a callback to get visited NetworkLinks
|
||||||
p.read(xml, function(features) {
|
p.read(xml, function(obj) {
|
||||||
// since maxDepth is 1, we will not get to the second feature
|
// since maxDepth is 1, we will not get to the second feature
|
||||||
expect(features.length).to.eql(1);
|
expect(obj.features.length).to.eql(1);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user