extractNationalNumberFromPossiblyIncompleteNumber.test.js 755 B

123456789101112131415
  1. import Metadata from '../metadata.js';
  2. import metadata from '../../metadata.min.json' assert { type: 'json' };
  3. import extractNationalNumberFromPossiblyIncompleteNumber from './extractNationalNumberFromPossiblyIncompleteNumber.js';
  4. describe('extractNationalNumberFromPossiblyIncompleteNumber', function () {
  5. it('should parse a carrier code when there is no national prefix transform rule', function () {
  6. var meta = new Metadata(metadata);
  7. meta.country('AU');
  8. extractNationalNumberFromPossiblyIncompleteNumber('18311800123', meta).should.deep.equal({
  9. nationalPrefix: undefined,
  10. carrierCode: '1831',
  11. nationalNumber: '1800123'
  12. });
  13. });
  14. });
  15. //# sourceMappingURL=extractNationalNumberFromPossiblyIncompleteNumber.test.js.map