@legendaryrob/countrify
Version:
A package to assist in the disection of ISO-3166-1(country) and ISO-3166-2(subdivision) ISO standards.
12 lines (9 loc) • 305 B
JavaScript
const getName = require('../index');
describe('.getName', () => {
it('returns the country name from the alpha3 code', () => {
expect(getName('ZAF')).toBe('South Africa');
});
it('returns the country name from the Alpha2 code', () => {
expect(getName('ZA')).toBe('South Africa');
});
});