forked from thegamenicorus/react-native-phone-input
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jacques de Villiers
committed
Nov 4, 2021
1 parent
e97bc8c
commit 043a8db
Showing
3 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { expect } from 'chai'; | ||
import PhoneNumber from '../src/PhoneNumber'; | ||
|
||
describe('getNumberType', () => { | ||
it('returns UNKNOWN type', () => { | ||
const number = '+44000'; | ||
const iso2 = 'gb'; | ||
const numberType = PhoneNumber.getNumberType(number, iso2); | ||
expect(numberType).to.equal('UNKNOWN'); | ||
}); | ||
|
||
it('returns MOBILE type', () => { | ||
const number = '+447900000001'; | ||
const iso2 = 'gb'; | ||
const numberType = PhoneNumber.getNumberType(number, iso2); | ||
expect(numberType).to.equal('MOBILE'); | ||
}); | ||
|
||
it('returns FIXED_LINE type', () => { | ||
const number = '+442072212217'; | ||
const iso2 = 'gb'; | ||
const numberType = PhoneNumber.getNumberType(number, iso2); | ||
expect(numberType).to.equal('FIXED_LINE'); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.