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 = {
'name': 'venue name',
'layer': 'venue',
'housenumber': '1',
'street': 'Main St',
'housenumber': 'house number',
'street': 'street name',
'neighbourhood': 'neighbourhood name',
'locality': 'locality name',
'localadmin': 'localadmin name',
@ -33,10 +33,10 @@ module.exports.tests.canada = function(test, common) {
test('street', function(t) {
var doc = {
'name': '1 Main St',
'name': 'house number street name',
'layer': 'address',
'housenumber': '1',
'street': 'Main St',
'housenumber': 'house number',
'street': 'street name',
'neighbourhood': 'neighbourhood name',
'locality': 'locality name',
'localadmin': 'localadmin name',
@ -48,7 +48,7 @@ module.exports.tests.canada = function(test, common) {
'country_a': 'CAN',
'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();
});

16
test/unit/helper/labelGenerator_GBR.js

@ -15,8 +15,8 @@ module.exports.tests.united_kingdom = function(test, common) {
var doc = {
'name': 'venue name',
'layer': 'venue',
'housenumber': '1',
'street': 'Main St',
'housenumber': 'house number',
'street': 'street name',
'neighbourhood': 'neighbourhood name',
'locality': 'locality name',
'localadmin': 'localadmin name',
@ -35,8 +35,8 @@ module.exports.tests.united_kingdom = function(test, common) {
var doc = {
'name': 'venue name',
'layer': 'venue',
'housenumber': '1',
'street': 'Main St',
'housenumber': 'house number',
'street': 'street name',
'neighbourhood': 'neighbourhood name',
'localadmin': 'localadmin name',
'county': 'county name',
@ -52,10 +52,10 @@ module.exports.tests.united_kingdom = function(test, common) {
test('street', function(t) {
var doc = {
'name': 'street address',
'name': 'house number street name',
'layer': 'address',
'housenumber': '1',
'street': 'Main St',
'housenumber': 'house number',
'street': 'street name',
'neighbourhood': 'neighbourhood name',
'locality': 'locality name',
'localadmin': 'localadmin name',
@ -66,7 +66,7 @@ module.exports.tests.united_kingdom = function(test, common) {
'country_a': 'GBR',
'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();
});

16
test/unit/helper/labelGenerator_USA.js

@ -14,8 +14,8 @@ module.exports.tests.united_states = function(test, common) {
var doc = {
'name': 'venue name',
'layer': 'venue',
'housenumber': '1',
'street': 'Main St',
'housenumber': 'house number',
'street': 'street name',
'neighbourhood': 'neighbourhood name',
'locality': 'locality name',
'localadmin': 'localadmin name',
@ -35,8 +35,8 @@ module.exports.tests.united_states = function(test, common) {
var doc = {
'name': 'venue name',
'layer': 'venue',
'housenumber': '1',
'street': 'Main St',
'housenumber': 'house number',
'street': 'street name',
'neighbourhood': 'neighbourhood name',
'localadmin': 'localadmin name',
'county': 'county name',
@ -53,10 +53,10 @@ module.exports.tests.united_states = function(test, common) {
test('street', function(t) {
var doc = {
'name': '1 Main St',
'name': 'house number street name',
'layer': 'address',
'housenumber': '1',
'street': 'Main St',
'housenumber': 'house number',
'street': 'street name',
'neighbourhood': 'neighbourhood name',
'locality': 'locality name',
'localadmin': 'localadmin name',
@ -68,7 +68,7 @@ module.exports.tests.united_states = function(test, common) {
'country_a': 'USA',
'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();
});

16
test/unit/helper/labelGenerator_default.js

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

Loading…
Cancel
Save