Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added name for all GB countries #35

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/scotland.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"flag":"","geoJSON":{},"ISO":{"alpha2":"GB","alpha3":"GBR"},"provinces":["Aberdeen City","Aberdeenshire","Angus","Argyll and Bute","City of Edinburgh","Clackmannanshire","Dumfries and Galloway","Dundee City","East Ayrshire","East Dunbartonshire","East Lothian","East Renfrewshire","Eilean Siar (Western Isles)","Falkirk","Fife","Glasgow City","Highland","Inverclyde","Midlothian","Moray","North Ayrshire","North Lanarkshire","Orkney Islands","Perth and Kinross","Renfrewshire","Shetland Islands","South Ayrshire","South Lanarkshire","Stirling","The Scottish Borders","West Dunbartonshire","West Lothian"],"tld":[],"wiki":"http://en.wikipedia.org/wiki/scotland"}
{"name":"Scotland", "flag":"","geoJSON":{},"ISO":{"alpha2":"GB","alpha3":"GBR"},"provinces":["Aberdeen City","Aberdeenshire","Angus","Argyll and Bute","City of Edinburgh","Clackmannanshire","Dumfries and Galloway","Dundee City","East Ayrshire","East Dunbartonshire","East Lothian","East Renfrewshire","Eilean Siar (Western Isles)","Falkirk","Fife","Glasgow City","Highland","Inverclyde","Midlothian","Moray","North Ayrshire","North Lanarkshire","Orkney Islands","Perth and Kinross","Renfrewshire","Shetland Islands","South Ayrshire","South Lanarkshire","Stirling","The Scottish Borders","West Dunbartonshire","West Lothian"],"tld":[],"wiki":"http://en.wikipedia.org/wiki/scotland"}
2 changes: 1 addition & 1 deletion data/wales.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"flag":"","geoJSON":{},"ISO":{"alpha2":"GB","alpha3":"GBR"},"provinces":["Blaenau Gwent","Bridgend","Caerphilly","Cardiff","Carmarthenshire","Ceredigion","Conwy","Denbighshire","Flintshire","Gwynedd","Isle of Anglesey","Merthyr Tydfil","Monmouthshire","Neath Port Talbot","Newport","Pembrokeshire","Powys","Rhondda Cynon Taff","Swansea","The Vale of Glamorgan","Torfaen","Wrexham"],"tld":[],"wiki":"http://en.wikipedia.org/wiki/wales"}
{"name":"Wales", "flag":"","geoJSON":{},"ISO":{"alpha2":"GB","alpha3":"GBR"},"provinces":["Blaenau Gwent","Bridgend","Caerphilly","Cardiff","Carmarthenshire","Ceredigion","Conwy","Denbighshire","Flintshire","Gwynedd","Isle of Anglesey","Merthyr Tydfil","Monmouthshire","Neath Port Talbot","Newport","Pembrokeshire","Powys","Rhondda Cynon Taff","Swansea","The Vale of Glamorgan","Torfaen","Wrexham"],"tld":[],"wiki":"http://en.wikipedia.org/wiki/wales"}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "countryjs",
"name": "countryjs-progressclaim-fork",
"version": "1.5.2",
"description": "A utility library for returning country data, ISO info and states/provinces within them.",
"main": "index.js",
Expand All @@ -11,7 +11,7 @@
"Michael Scott Hertzberg <[email protected]> [@moimikey] (http://michael.hertzberg.co)",
"Loris Guignard <[email protected]> [@loris]"
],
"repository": "therebelrobot/countryjs",
"repository": "progressclaim/countryjs",
"engines": [
"node"
],
Expand Down
18 changes: 18 additions & 0 deletions test/countryjs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,24 @@ describe('countryjs', function () {
expect(tester).to.be.a('string')
done()
})
it('should get info for United Kingdom in GB', function (done) {
var tester = country.info('United Kingdom', 'name')
expect(tester).to.be.a('object')
expect(tester.name).to.equal('United Kingdom')
done()
})
it('should get info for Scotland in GB', function (done) {
var tester = country.info('Scotland', 'name')
expect(tester).to.be.a('object')
expect(tester.name).to.equal('Scotland')
done()
})
it('should get info for Wales in GB', function (done) {
var tester = country.info('Wales', 'name')
expect(tester).to.be.a('object')
expect(tester.name).to.equal('Wales')
done()
})
it('should undefined for a mismatched country identifier', function (done) {
var tester = country.info('UX')
expect(tester).to.be.an('undefined')
Expand Down