@ -33,10 +33,10 @@ module.exports.tests.address_parser = function(test, common) {
module . exports . tests . layers _parameter = function ( test , common ) {
module . exports . tests . layers _parameter = function ( test , common ) {
test ( 'layers parameter specifies only some layers' , function ( t ) {
test ( 'layers parameter specifies only some layers' , function ( t ) {
var cleaned _types = {
var cleaned _types = {
from _layers : [ 'geonames ' ]
from _layers : [ 'geoname' ]
} ;
} ;
var actual = types ( cleaned _types ) ;
var actual = types ( cleaned _types ) ;
var expected = [ 'geonames ' ] ;
var expected = [ 'geoname' ] ;
t . deepEqual ( actual , expected , 'only types specified by layers parameter returned' ) ;
t . deepEqual ( actual , expected , 'only types specified by layers parameter returned' ) ;
t . end ( ) ;
t . end ( ) ;
} ) ;
} ) ;
@ -45,11 +45,11 @@ module.exports.tests.layers_parameter = function(test, common) {
module . exports . tests . layers _parameter _and _address _parser = function ( test , common ) {
module . exports . tests . layers _parameter _and _address _parser = function ( test , common ) {
test ( 'layers parameter and address parser present' , function ( t ) {
test ( 'layers parameter and address parser present' , function ( t ) {
var cleaned _types = {
var cleaned _types = {
from _layers : [ 'geonames ' ] ,
from _layers : [ 'geoname' ] ,
from _address _parser : [ 'admin0' ] // simplified return value from address parse
from _address _parser : [ 'admin0' ] // simplified return value from address parse
} ;
} ;
var actual = types ( cleaned _types ) ;
var actual = types ( cleaned _types ) ;
var expected = [ 'geonames ' ] ;
var expected = [ 'geoname' ] ;
t . deepEqual ( actual , expected , 'layers parameter overrides address parser completely' ) ;
t . deepEqual ( actual , expected , 'layers parameter overrides address parser completely' ) ;
t . end ( ) ;
t . end ( ) ;
} ) ;
} ) ;