mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-19 16:12:14 +11:00
13 lines
No EOL
412 B
JavaScript
13 lines
No EOL
412 B
JavaScript
import metadata from '../metadata.min.json'
|
|
|
|
import getCountryCallingCode from './getCountryCallingCode'
|
|
|
|
describe('getCountryCallingCode', () => {
|
|
it('should get country calling code', () => {
|
|
getCountryCallingCode('US', metadata).should.equal('1')
|
|
})
|
|
|
|
it('should throw if country is unknown', () => {
|
|
expect(() => getCountryCallingCode('ZZ', metadata)).to.throw('Unknown country: ZZ')
|
|
})
|
|
}) |