|
|
@ -41,9 +41,10 @@ module.exports.tests.sanitize_layers = function(test, common) { |
|
|
|
|
|
|
|
|
|
|
|
sanitizer.sanitize(raw, clean); |
|
|
|
sanitizer.sanitize(raw, clean); |
|
|
|
|
|
|
|
|
|
|
|
var admin_layers = [ 'continent', 'country', 'dependency', |
|
|
|
var admin_layers = [ 'continent', 'country', 'dependency', 'macroregion', |
|
|
|
'macroregion', 'region', 'locality', 'localadmin', 'macrocounty', 'county', |
|
|
|
'region', 'locality', 'localadmin', 'macrocounty', 'county', 'macrohood', |
|
|
|
'macrohood', 'borough', 'neighbourhood', 'microhood', 'disputed', 'postalcode' ]; |
|
|
|
'borough', 'neighbourhood', 'microhood', 'disputed', 'postalcode', 'ocean', |
|
|
|
|
|
|
|
'marinearea' ]; |
|
|
|
|
|
|
|
|
|
|
|
t.deepEqual(clean.layers, admin_layers, 'coarse layers set'); |
|
|
|
t.deepEqual(clean.layers, admin_layers, 'coarse layers set'); |
|
|
|
t.end(); |
|
|
|
t.end(); |
|
|
@ -78,7 +79,8 @@ module.exports.tests.sanitize_layers = function(test, common) { |
|
|
|
|
|
|
|
|
|
|
|
var expected_layers = [ 'continent', 'country', 'dependency', |
|
|
|
var expected_layers = [ 'continent', 'country', 'dependency', |
|
|
|
'macroregion', 'region', 'locality', 'localadmin', 'macrocounty', 'county', |
|
|
|
'macroregion', 'region', 'locality', 'localadmin', 'macrocounty', 'county', |
|
|
|
'macrohood', 'borough', 'neighbourhood', 'microhood', 'disputed', 'postalcode' ]; |
|
|
|
'macrohood', 'borough', 'neighbourhood', 'microhood', 'disputed', 'postalcode', |
|
|
|
|
|
|
|
'ocean', 'marinearea']; |
|
|
|
|
|
|
|
|
|
|
|
t.deepEqual(clean.layers, expected_layers, 'coarse + regular layers set'); |
|
|
|
t.deepEqual(clean.layers, expected_layers, 'coarse + regular layers set'); |
|
|
|
t.end(); |
|
|
|
t.end(); |
|
|
@ -115,7 +117,7 @@ module.exports.tests.sanitize_layers = function(test, common) { |
|
|
|
var coarse_layers = [ 'continent', |
|
|
|
var coarse_layers = [ 'continent', |
|
|
|
'country', 'dependency', 'macroregion', 'region', 'locality', 'localadmin', |
|
|
|
'country', 'dependency', 'macroregion', 'region', 'locality', 'localadmin', |
|
|
|
'macrocounty', 'county', 'macrohood', 'borough', 'neighbourhood', 'microhood', |
|
|
|
'macrocounty', 'county', 'macrohood', 'borough', 'neighbourhood', 'microhood', |
|
|
|
'disputed', 'postalcode' ]; |
|
|
|
'disputed', 'postalcode', 'ocean', 'marinearea' ]; |
|
|
|
|
|
|
|
|
|
|
|
var venue_layers = [ 'venue' ]; |
|
|
|
var venue_layers = [ 'venue' ]; |
|
|
|
var expected_layers = venue_layers.concat(coarse_layers); |
|
|
|
var expected_layers = venue_layers.concat(coarse_layers); |
|
|
|