@legendaryrob/countrify
Version:
A package to assist in the disection of ISO-3166-1(country) and ISO-3166-2(subdivision) ISO standards.
26 lines (23 loc) • 613 B
JavaScript
const getSubdivisionList = require('../index');
test('returns the subDivisions using the alpha3 code', () => {
expect(getSubdivisionList('ZAF', 'en')).toEqual(['Eastern Cape',
'Free State',
'Gauteng',
'Limpopo',
'Mpumalanga',
'Northern Cape',
'KwaZulu-Natal',
'North West',
'Western Cape']);
});
test('returns the subDivisions using the Alpha2 code', () => {
expect(getSubdivisionList('ZA', 'en')).toEqual(['Eastern Cape',
'Free State',
'Gauteng',
'Limpopo',
'Mpumalanga',
'Northern Cape',
'KwaZulu-Natal',
'North West',
'Western Cape']);
});