You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							19 lines
						
					
					
						
							629 B
						
					
					
				
			
		
		
	
	
							19 lines
						
					
					
						
							629 B
						
					
					
				import extractCountryCallingCode from './extractCountryCallingCode.js'
 | 
						|
import metadata from '../../metadata.min.json' assert { type: 'json' }
 | 
						|
 | 
						|
describe('extractCountryCallingCode', () => {
 | 
						|
	it('should extract country calling code from a number', () => {
 | 
						|
		extractCountryCallingCode('+78005553535', null, null, metadata).should.deep.equal({
 | 
						|
			countryCallingCode: '7',
 | 
						|
			number: '8005553535'
 | 
						|
		})
 | 
						|
 | 
						|
		extractCountryCallingCode('+7800', null, null, metadata).should.deep.equal({
 | 
						|
			countryCallingCode: '7',
 | 
						|
			number: '800'
 | 
						|
		})
 | 
						|
 | 
						|
		extractCountryCallingCode('', null, null, metadata).should.deep.equal({})
 | 
						|
	})
 | 
						|
})
 |