Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/../uploads/../../../../instantly.picotech.app/homes/../../wa.picotech.app/public_html/node_modules/path-exists/../duplexify/./.././debug/../node-wav/../domhandler/../qrcode/../ieee754/../asynckit/../toidentifier/../delayed-stream/../libphonenumber-js/min/../source/.
الملفات الموجودة في هذا الـ Path:
.
..
AsYouType.js
AsYouType.test.js
AsYouTypeFormatter.PatternMatcher.d.ts
AsYouTypeFormatter.PatternMatcher.js
AsYouTypeFormatter.PatternMatcher.test.js
AsYouTypeFormatter.PatternParser.d.ts
AsYouTypeFormatter.PatternParser.js
AsYouTypeFormatter.PatternParser.test.js
AsYouTypeFormatter.complete.js
AsYouTypeFormatter.js
AsYouTypeFormatter.util.js
AsYouTypeFormatter.util.test.js
AsYouTypeParser.js
AsYouTypeState.js
ParseError.js
PhoneNumber.js
PhoneNumber.test.js
PhoneNumberMatcher.js
PhoneNumberMatcher.test.js
constants.js
findNumbers
findPhoneNumbersInText.js
findPhoneNumbersInText.test.js
format.js
format.test.js
formatIncompletePhoneNumber.js
formatIncompletePhoneNumber.test.js
formatPhoneNumberForMobileDialing.js
formatPhoneNumberForMobileDialing.test.js
getCountries.js
getCountries.test.js
getCountryCallingCode.js
getCountryCallingCode.test.js
getExampleNumber.js
getExampleNumber.test.js
helpers
isPossible.js
isPossible.test.js
isPossiblePhoneNumber.js
isPossiblePhoneNumber.test.js
isValid.js
isValid.test.js
isValidPhoneNumber.js
isValidPhoneNumber.test.js
legacy
metadata.js
metadata.test.js
normalizeArguments.js
parse.js
parse.test.js
parseIncompletePhoneNumber.js
parseIncompletePhoneNumber.test.js
parsePhoneNumber.js
parsePhoneNumber.test.js
parsePhoneNumberWithError.js
parsePhoneNumberWithError.test.js
parsePhoneNumberWithError_.js
parsePhoneNumber_.js
searchPhoneNumbersInText.js
searchPhoneNumbersInText.test.js
tools
validatePhoneNumberLength.js
validatePhoneNumberLength.test.js

مشاهدة ملف: getCountryCallingCode.test.js

import metadata from '../metadata.min.json' assert { type: 'json' }

import getCountryCallingCode from './getCountryCallingCode.js'

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')
	})
})