15815213711
2024-08-26 67b8b6731811983447e053d4396b3708c14dfe3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import getNumberType from './getNumberType.js';
import oldMetadata from '../../test/metadata/1.0.0/metadata.min.json' assert { type: 'json' };
import Metadata from '../metadata.js';
describe('getNumberType', function () {
  it('should get number type when using old metadata', function () {
    getNumberType({
      nationalNumber: '2133734253',
      country: 'US'
    }, {
      v2: true
    }, oldMetadata).should.equal('FIXED_LINE_OR_MOBILE');
  });
  it('should return `undefined` when the phone number is a malformed one', function () {
    expect(getNumberType({}, {
      v2: true
    }, oldMetadata)).to.equal(undefined);
  });
});
//# sourceMappingURL=getNumberType.test.js.map