✨ MAJOR FEATURES: • Auto-zoom intelligence với smart bounds fitting • Enhanced 3D GPS markers với pulsing effects • Professional route display với 6-layer rendering • Status-based parking icons với availability indicators • Production-ready build optimizations 🗺️ AUTO-ZOOM FEATURES: • Smart bounds fitting cho GPS + selected parking • Adaptive padding (50px) cho visual balance • Max zoom control (level 16) để tránh quá gần • Dynamic centering khi không có selection 🎨 ENHANCED VISUALS: • 3D GPS marker với multi-layer pulse effects • Advanced parking icons với status colors • Selection highlighting với animation • Dimming system cho non-selected items 🛣️ ROUTE SYSTEM: • OpenRouteService API integration • Multi-layer route rendering (glow, shadow, main, animated) • Real-time distance & duration calculation • Visual route info trong popup 📱 PRODUCTION READY: • SSR safe với dynamic imports • Build errors resolved • Global deployment via Vercel • Optimized performance 🌍 DEPLOYMENT: • Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app • Bundle size: 22.8 kB optimized • Global CDN distribution • HTTPS enabled 💾 VERSION CONTROL: • MapView-v2.0.tsx backup created • MAPVIEW_VERSIONS.md documentation • Full version history tracking
30 lines
1.3 KiB
JavaScript
30 lines
1.3 KiB
JavaScript
import _validatePhoneNumberLength from './validatePhoneNumberLength.js'
|
|
import metadata from '../metadata.min.json' assert { type: 'json' }
|
|
|
|
function validatePhoneNumberLength(...parameters) {
|
|
parameters.push(metadata)
|
|
return _validatePhoneNumberLength.apply(this, parameters)
|
|
}
|
|
|
|
describe('validatePhoneNumberLength', () => {
|
|
it('should detect whether a phone number length is valid', () => {
|
|
// Not a phone number.
|
|
validatePhoneNumberLength('+').should.equal('NOT_A_NUMBER')
|
|
validatePhoneNumberLength('abcde').should.equal('NOT_A_NUMBER')
|
|
|
|
// No country supplied for a national number.
|
|
validatePhoneNumberLength('123').should.equal('INVALID_COUNTRY')
|
|
|
|
// Too short while the number is not considered "viable"
|
|
// by Google's `libphonenumber`.
|
|
validatePhoneNumberLength('2', 'US').should.equal('TOO_SHORT')
|
|
validatePhoneNumberLength('+1', 'US').should.equal('TOO_SHORT')
|
|
validatePhoneNumberLength('+12', 'US').should.equal('TOO_SHORT')
|
|
|
|
// Test national (significant) number length.
|
|
validatePhoneNumberLength('444 1 44', 'TR').should.equal('TOO_SHORT')
|
|
expect(validatePhoneNumberLength('444 1 444', 'TR')).to.be.undefined
|
|
validatePhoneNumberLength('444 1 4444', 'TR').should.equal('INVALID_LENGTH')
|
|
validatePhoneNumberLength('444 1 4444444444', 'TR').should.equal('TOO_LONG')
|
|
})
|
|
}) |