Skip to content

Commit

Permalink
Make xo happy
Browse files Browse the repository at this point in the history
  • Loading branch information
meeDamian committed Sep 14, 2024
1 parent 9c1c803 commit 277c771
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ test('fails on no match', t => {
});

test('returns country code for every country name in JSON', async t => {
const countries = (await import('../countries.json', {with: {type: 'json'}})).default;
const {default: countries} = await import('../countries.json', {with: {type: 'json'}});

Object.values(countries).flat().forEach(name => {
for (const name of Object.values(countries).flat()) {
t.not(code(name), undefined, `Should return code for name ${name}`);
});
}
});

//
Expand Down
6 changes: 3 additions & 3 deletions test/name.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ test('returns undefined if non-alphabetic characters are given', t => {
});

test('returns country name for every country code in JSON', async t => {
const countries = (await import('../countries.json', {with: {type: 'json'}})).default;
const {default: countries} = await import('../countries.json', {with: {type: 'json'}});

Object.keys(countries).forEach(code => {
for (const code of Object.keys(countries)) {
t.not(name(code), undefined, `Should return correct name for code ${code}`);
});
}
});

//
Expand Down

0 comments on commit 277c771

Please sign in to comment.