Skip to content

Commit

Permalink
Return Türkiye by default
Browse files Browse the repository at this point in the history
  • Loading branch information
meeDamian committed Aug 29, 2024
1 parent 258646f commit 721e516
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion countries.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"TM": ["Turkmenistan", "Turkmen"],
"TN": ["Tunisia", "Tunisian"],
"TO": ["Tonga", "Tongan"],
"TR": ["Turkey", "Turkish", "Türkiye"],
"TR": ["Türkiye","Turkey", "Turkish"],
"TT": ["Trinidad and Tobago", "Trinidadian"],
"TV": ["Tuvalu", "Tuvaluan"],
"TW": ["Taiwan", "Taiwanese"],
Expand Down
5 changes: 5 additions & 0 deletions test/name.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ test('returns correct name for Macedonian country code', t => {
t.is(country, 'Republic of North Macedonia', 'Should return correct name for code MK');
});

test('returns name with diacritics for code TR', t => {
const country = name('TR');
t.is(country, 'Türkiye', 'Should return correct name for code TR');
});

test('returns undefined if invalid code is given', t => {
const country = name('YY');
t.is(country, undefined, 'Should return undefined for invalid code YY');
Expand Down

0 comments on commit 721e516

Please sign in to comment.