Browse Source

standardized on naming conventions

pull/497/head
Stephen Hess 9 years ago
parent
commit
caa9745aaa
  1. 12
      test/unit/helper/labelGenerator_CAN.js
  2. 16
      test/unit/helper/labelGenerator_GBR.js
  3. 16
      test/unit/helper/labelGenerator_USA.js
  4. 16
      test/unit/helper/labelGenerator_default.js

12
test/unit/helper/labelGenerator_CAN.js

@ -14,8 +14,8 @@ module.exports.tests.canada = function(test, common) {
var doc = { var doc = {
'name': 'venue name', 'name': 'venue name',
'layer': 'venue', 'layer': 'venue',
'housenumber': '1', 'housenumber': 'house number',
'street': 'Main St', 'street': 'street name',
'neighbourhood': 'neighbourhood name', 'neighbourhood': 'neighbourhood name',
'locality': 'locality name', 'locality': 'locality name',
'localadmin': 'localadmin name', 'localadmin': 'localadmin name',
@ -33,10 +33,10 @@ module.exports.tests.canada = function(test, common) {
test('street', function(t) { test('street', function(t) {
var doc = { var doc = {
'name': '1 Main St', 'name': 'house number street name',
'layer': 'address', 'layer': 'address',
'housenumber': '1', 'housenumber': 'house number',
'street': 'Main St', 'street': 'street name',
'neighbourhood': 'neighbourhood name', 'neighbourhood': 'neighbourhood name',
'locality': 'locality name', 'locality': 'locality name',
'localadmin': 'localadmin name', 'localadmin': 'localadmin name',
@ -48,7 +48,7 @@ module.exports.tests.canada = function(test, common) {
'country_a': 'CAN', 'country_a': 'CAN',
'country': 'Canada' 'country': 'Canada'
}; };
t.equal(generator(doc),'1 Main St, locality name, region abbr, Canada'); t.equal(generator(doc),'house number street name, locality name, region abbr, Canada');
t.end(); t.end();
}); });

16
test/unit/helper/labelGenerator_GBR.js

@ -15,8 +15,8 @@ module.exports.tests.united_kingdom = function(test, common) {
var doc = { var doc = {
'name': 'venue name', 'name': 'venue name',
'layer': 'venue', 'layer': 'venue',
'housenumber': '1', 'housenumber': 'house number',
'street': 'Main St', 'street': 'street name',
'neighbourhood': 'neighbourhood name', 'neighbourhood': 'neighbourhood name',
'locality': 'locality name', 'locality': 'locality name',
'localadmin': 'localadmin name', 'localadmin': 'localadmin name',
@ -35,8 +35,8 @@ module.exports.tests.united_kingdom = function(test, common) {
var doc = { var doc = {
'name': 'venue name', 'name': 'venue name',
'layer': 'venue', 'layer': 'venue',
'housenumber': '1', 'housenumber': 'house number',
'street': 'Main St', 'street': 'street name',
'neighbourhood': 'neighbourhood name', 'neighbourhood': 'neighbourhood name',
'localadmin': 'localadmin name', 'localadmin': 'localadmin name',
'county': 'county name', 'county': 'county name',
@ -52,10 +52,10 @@ module.exports.tests.united_kingdom = function(test, common) {
test('street', function(t) { test('street', function(t) {
var doc = { var doc = {
'name': 'street address', 'name': 'house number street name',
'layer': 'address', 'layer': 'address',
'housenumber': '1', 'housenumber': 'house number',
'street': 'Main St', 'street': 'street name',
'neighbourhood': 'neighbourhood name', 'neighbourhood': 'neighbourhood name',
'locality': 'locality name', 'locality': 'locality name',
'localadmin': 'localadmin name', 'localadmin': 'localadmin name',
@ -66,7 +66,7 @@ module.exports.tests.united_kingdom = function(test, common) {
'country_a': 'GBR', 'country_a': 'GBR',
'country': 'United Kingdom' 'country': 'United Kingdom'
}; };
t.equal(generator(doc),'street address, locality name, macroregion name, United Kingdom'); t.equal(generator(doc),'house number street name, locality name, macroregion name, United Kingdom');
t.end(); t.end();
}); });

16
test/unit/helper/labelGenerator_USA.js

@ -14,8 +14,8 @@ module.exports.tests.united_states = function(test, common) {
var doc = { var doc = {
'name': 'venue name', 'name': 'venue name',
'layer': 'venue', 'layer': 'venue',
'housenumber': '1', 'housenumber': 'house number',
'street': 'Main St', 'street': 'street name',
'neighbourhood': 'neighbourhood name', 'neighbourhood': 'neighbourhood name',
'locality': 'locality name', 'locality': 'locality name',
'localadmin': 'localadmin name', 'localadmin': 'localadmin name',
@ -35,8 +35,8 @@ module.exports.tests.united_states = function(test, common) {
var doc = { var doc = {
'name': 'venue name', 'name': 'venue name',
'layer': 'venue', 'layer': 'venue',
'housenumber': '1', 'housenumber': 'house number',
'street': 'Main St', 'street': 'street name',
'neighbourhood': 'neighbourhood name', 'neighbourhood': 'neighbourhood name',
'localadmin': 'localadmin name', 'localadmin': 'localadmin name',
'county': 'county name', 'county': 'county name',
@ -53,10 +53,10 @@ module.exports.tests.united_states = function(test, common) {
test('street', function(t) { test('street', function(t) {
var doc = { var doc = {
'name': '1 Main St', 'name': 'house number street name',
'layer': 'address', 'layer': 'address',
'housenumber': '1', 'housenumber': 'house number',
'street': 'Main St', 'street': 'street name',
'neighbourhood': 'neighbourhood name', 'neighbourhood': 'neighbourhood name',
'locality': 'locality name', 'locality': 'locality name',
'localadmin': 'localadmin name', 'localadmin': 'localadmin name',
@ -68,7 +68,7 @@ module.exports.tests.united_states = function(test, common) {
'country_a': 'USA', 'country_a': 'USA',
'country': 'United States' 'country': 'United States'
}; };
t.equal(generator(doc),'1 Main St, locality name, region abbr, United States'); t.equal(generator(doc),'house number street name, locality name, region abbr, United States');
t.end(); t.end();
}); });

16
test/unit/helper/labelGenerator_default.js

@ -15,8 +15,8 @@ module.exports.tests.default_country = function(test, common) {
var doc = { var doc = {
'name': 'venue name', 'name': 'venue name',
'layer': 'venue', 'layer': 'venue',
'housenumber': '1', 'housenumber': 'house number',
'street': 'Main St', 'street': 'street name',
'neighbourhood': 'neighbourhood name', 'neighbourhood': 'neighbourhood name',
'locality': 'locality name', 'locality': 'locality name',
'localadmin': 'localadmin name', 'localadmin': 'localadmin name',
@ -35,8 +35,8 @@ module.exports.tests.default_country = function(test, common) {
var doc = { var doc = {
'name': 'venue name', 'name': 'venue name',
'layer': 'venue', 'layer': 'venue',
'housenumber': '1', 'housenumber': 'house number',
'street': 'Main St', 'street': 'street name',
'neighbourhood': 'neighbourhood name', 'neighbourhood': 'neighbourhood name',
'localadmin': 'localadmin name', 'localadmin': 'localadmin name',
'county': 'county name', 'county': 'county name',
@ -52,10 +52,10 @@ module.exports.tests.default_country = function(test, common) {
test('street', function(t) { test('street', function(t) {
var doc = { var doc = {
'name': 'address', 'name': 'house number street name',
'layer': 'address', 'layer': 'address',
'housenumber': '1', 'housenumber': 'house number',
'street': 'Main St', 'street': 'street name',
'neighbourhood': 'neighbourhood name', 'neighbourhood': 'neighbourhood name',
'locality': 'locality name', 'locality': 'locality name',
'localadmin': 'localadmin name', 'localadmin': 'localadmin name',
@ -66,7 +66,7 @@ module.exports.tests.default_country = function(test, common) {
'country_a': 'country code', 'country_a': 'country code',
'country': 'country name' 'country': 'country name'
}; };
t.equal(generator(doc),'address, locality name, country name'); t.equal(generator(doc),'house number street name, locality name, country name');
t.end(); t.end();
}); });

Loading…
Cancel
Save