@@ -36,7 +36,7 @@ describe('WebServiceClient', () => {
3636 } ) ;
3737
3838 it ( 'handles "full" responses' , async ( ) => {
39- expect . assertions ( 159 ) ;
39+ expect . assertions ( 167 ) ;
4040
4141 nockInstance
4242 . post ( fullPath ( 'factors' ) , factors . request . basic )
@@ -223,12 +223,24 @@ describe('WebServiceClient', () => {
223223 expect ( got . shippingAddress ?. distanceToBillingAddress ) . toEqual ( 22 ) ;
224224 expect ( got . shippingAddress ?. isInIpCountry ) . toEqual ( true ) ;
225225
226+ expect ( got . shippingPhone ?. country ) . toEqual ( 'CA' ) ;
227+ expect ( got . shippingPhone ?. isVoip ) . toEqual ( true ) ;
228+ expect ( got . shippingPhone ?. networkOperator ) . toEqual (
229+ 'Telus Mobility-SVR/2'
230+ ) ;
231+ expect ( got . shippingPhone ?. numberType ) . toEqual ( 'mobile' ) ;
232+
226233 expect ( got . billingAddress ?. isPostalInCity ) . toEqual ( true ) ;
227234 expect ( got . billingAddress ?. latitude ) . toEqual ( 37.545 ) ;
228235 expect ( got . billingAddress ?. longitude ) . toEqual ( - 122.421 ) ;
229236 expect ( got . billingAddress ?. distanceToIpLocation ) . toEqual ( 100 ) ;
230237 expect ( got . billingAddress ?. isInIpCountry ) . toEqual ( true ) ;
231238
239+ expect ( got . billingPhone ?. country ) . toEqual ( 'US' ) ;
240+ expect ( got . billingPhone ?. isVoip ) . toEqual ( false ) ;
241+ expect ( got . billingPhone ?. networkOperator ) . toEqual ( 'Verizon/1' ) ;
242+ expect ( got . billingPhone ?. numberType ) . toEqual ( 'fixed' ) ;
243+
232244 expect ( got . disposition ?. action ) . toEqual ( 'accept' ) ;
233245 expect ( got . disposition ?. reason ) . toEqual ( 'default' ) ;
234246 expect ( got . disposition ?. ruleLabel ) . toEqual ( 'the label' ) ;
@@ -270,7 +282,7 @@ describe('WebServiceClient', () => {
270282 } ) ;
271283
272284 it ( 'handles "full" responses' , async ( ) => {
273- expect . assertions ( 139 ) ;
285+ expect . assertions ( 147 ) ;
274286
275287 nockInstance
276288 . post ( fullPath ( 'insights' ) , insights . request . basic )
@@ -457,12 +469,24 @@ describe('WebServiceClient', () => {
457469 expect ( got . shippingAddress ?. distanceToBillingAddress ) . toEqual ( 22 ) ;
458470 expect ( got . shippingAddress ?. isInIpCountry ) . toEqual ( true ) ;
459471
472+ expect ( got . shippingPhone ?. country ) . toEqual ( 'CA' ) ;
473+ expect ( got . shippingPhone ?. isVoip ) . toEqual ( true ) ;
474+ expect ( got . shippingPhone ?. networkOperator ) . toEqual (
475+ 'Telus Mobility-SVR/2'
476+ ) ;
477+ expect ( got . shippingPhone ?. numberType ) . toEqual ( 'mobile' ) ;
478+
460479 expect ( got . billingAddress ?. isPostalInCity ) . toEqual ( true ) ;
461480 expect ( got . billingAddress ?. latitude ) . toEqual ( 37.545 ) ;
462481 expect ( got . billingAddress ?. longitude ) . toEqual ( - 122.421 ) ;
463482 expect ( got . billingAddress ?. distanceToIpLocation ) . toEqual ( 100 ) ;
464483 expect ( got . billingAddress ?. isInIpCountry ) . toEqual ( true ) ;
465484
485+ expect ( got . billingPhone ?. country ) . toEqual ( 'US' ) ;
486+ expect ( got . billingPhone ?. isVoip ) . toEqual ( false ) ;
487+ expect ( got . billingPhone ?. networkOperator ) . toEqual ( 'Verizon/1' ) ;
488+ expect ( got . billingPhone ?. numberType ) . toEqual ( 'fixed' ) ;
489+
466490 expect ( got . disposition ?. action ) . toEqual ( 'accept' ) ;
467491 expect ( got . disposition ?. reason ) . toEqual ( 'default' ) ;
468492 expect ( got . disposition ?. ruleLabel ) . toEqual ( 'the label' ) ;
0 commit comments