n8n-nodes-highlevelv2
Version:
n8n community node for HighLevel v2 API integration - comprehensive CRM, marketing automation, and business management platform
31 lines • 1.31 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const GenericFunctions_1 = require("../GenericFunctions");
describe('isPhoneValid', () => {
it('should return true for a valid phone number', () => {
const phone = '+1234567890';
const result = (0, GenericFunctions_1.isPhoneValid)(phone);
expect(result).toBe(true);
});
it('should return false for an invalid phone number', () => {
const phone = 'invalid-phone';
const result = (0, GenericFunctions_1.isPhoneValid)(phone);
expect(result).toBe(false);
});
it('should return false for a phone number with invalid characters', () => {
const phone = '+123-abc-456';
const result = (0, GenericFunctions_1.isPhoneValid)(phone);
expect(result).toBe(false);
});
it('should return false for an empty phone number', () => {
const phone = '';
const result = (0, GenericFunctions_1.isPhoneValid)(phone);
expect(result).toBe(false);
});
it('should return false for a phone number with only special characters', () => {
const phone = '!!!@@@###';
const result = (0, GenericFunctions_1.isPhoneValid)(phone);
expect(result).toBe(false);
});
});
//# sourceMappingURL=IsPhoneValid.test.js.map