template-saas/apps/backend/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.test.js
rckrdmrd 26f0e52ca7 feat: Initial commit - template-saas
Template base para proyectos SaaS multi-tenant.

Estructura inicial:
- apps/backend (NestJS API)
- apps/frontend (React/Vite)
- apps/database (PostgreSQL DDL)
- docs/ (Documentación)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 04:41:24 -06:00

18 lines
861 B
JavaScript

import extractCountryCallingCode from './extractCountryCallingCode.js';
import metadata from '../../metadata.min.json' with { type: 'json' };
describe('extractCountryCallingCode', function () {
it('should extract country calling code from a number', function () {
expect(extractCountryCallingCode('+78005553535', null, null, null, metadata)).to.deep.equal({
countryCallingCodeSource: 'FROM_NUMBER_WITH_PLUS_SIGN',
countryCallingCode: '7',
number: '8005553535'
});
expect(extractCountryCallingCode('+7800', null, null, null, metadata)).to.deep.equal({
countryCallingCodeSource: 'FROM_NUMBER_WITH_PLUS_SIGN',
countryCallingCode: '7',
number: '800'
});
expect(extractCountryCallingCode('', null, null, null, metadata)).to.deep.equal({});
});
});
//# sourceMappingURL=extractCountryCallingCode.test.js.map