UNPKG

@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) 299 B
const getAlpha3 = require('../index'); describe('.getAlpha3', () => { it('returns the alpha3 code from country name', () => { expect(getAlpha3('South Africa')).toBe('ZAF'); }); it('returns the alpha3 code from the Alpha2 code', () => { expect(getAlpha3('ZA')).toBe('ZAF'); }); });