@@ -398,7 +398,7 @@ describe('address', () => {
398398 for ( let i = 0 ; i < 100 ; i ++ ) {
399399 const latitude = faker . address . latitude ( ) ;
400400
401- expect ( typeof latitude ) . toBe ( 'string' ) ;
401+ expect ( latitude ) . toBeTypeOf ( 'string' ) ;
402402
403403 const latitude_float = parseFloat ( latitude ) ;
404404
@@ -411,7 +411,7 @@ describe('address', () => {
411411 for ( let i = 0 ; i < 100 ; i ++ ) {
412412 const latitude = faker . address . latitude ( - 5 , 5 ) ;
413413
414- expect ( typeof latitude ) . toBe ( 'string' ) ;
414+ expect ( latitude ) . toBeTypeOf ( 'string' ) ;
415415 expect (
416416 latitude . split ( '.' ) [ 1 ] . length ,
417417 'The precision of latitude should be 4 digits'
@@ -428,7 +428,7 @@ describe('address', () => {
428428 for ( let i = 0 ; i < 100 ; i ++ ) {
429429 const latitude = faker . address . latitude ( undefined , undefined , 7 ) ;
430430
431- expect ( typeof latitude ) . toBe ( 'string' ) ;
431+ expect ( latitude ) . toBeTypeOf ( 'string' ) ;
432432 expect (
433433 latitude . split ( '.' ) [ 1 ] . length ,
434434 'The precision of latitude should be 7 digits'
@@ -447,7 +447,7 @@ describe('address', () => {
447447 for ( let i = 0 ; i < 100 ; i ++ ) {
448448 const longitude = faker . address . longitude ( ) ;
449449
450- expect ( typeof longitude ) . toBe ( 'string' ) ;
450+ expect ( longitude ) . toBeTypeOf ( 'string' ) ;
451451
452452 const longitude_float = parseFloat ( longitude ) ;
453453
@@ -460,7 +460,7 @@ describe('address', () => {
460460 for ( let i = 0 ; i < 100 ; i ++ ) {
461461 const longitude = faker . address . longitude ( 100 , - 30 ) ;
462462
463- expect ( typeof longitude ) . toBe ( 'string' ) ;
463+ expect ( longitude ) . toBeTypeOf ( 'string' ) ;
464464 expect (
465465 longitude . split ( '.' ) [ 1 ] . length ,
466466 'The precision of longitude should be 4 digits'
@@ -477,7 +477,7 @@ describe('address', () => {
477477 for ( let i = 0 ; i < 100 ; i ++ ) {
478478 const longitude = faker . address . longitude ( undefined , undefined , 7 ) ;
479479
480- expect ( typeof longitude ) . toBe ( 'string' ) ;
480+ expect ( longitude ) . toBeTypeOf ( 'string' ) ;
481481 expect (
482482 longitude . split ( '.' ) [ 1 ] . length ,
483483 'The precision of longitude should be 7 digits'
@@ -499,9 +499,9 @@ describe('address', () => {
499499 'The abbreviation of direction when useAbbr is true should' ;
500500
501501 expect (
502- typeof direction ,
502+ direction ,
503503 `${ prefixErrorMessage } be of type string. Current is ${ typeof direction } `
504- ) . toBe ( 'string' ) ;
504+ ) . toBeTypeOf ( 'string' ) ;
505505 expect ( lengthDirection ) . lessThanOrEqual ( 2 ) ;
506506 } ) ;
507507 } ) ;
@@ -515,9 +515,9 @@ describe('address', () => {
515515 'The ordinal direction when useAbbr is true should' ;
516516
517517 expect (
518- typeof ordinalDirection ,
518+ ordinalDirection ,
519519 `${ prefixErrorMessage } be equal ${ expectedType } . Current is ${ typeof ordinalDirection } `
520- ) . toBe ( expectedType ) ;
520+ ) . toBeTypeOf ( expectedType ) ;
521521 expect ( ordinalDirectionLength ) . lessThanOrEqual ( 2 ) ;
522522 } ) ;
523523 } ) ;
@@ -531,9 +531,9 @@ describe('address', () => {
531531 'The cardinal direction when useAbbr is true should' ;
532532
533533 expect (
534- typeof cardinalDirection ,
534+ cardinalDirection ,
535535 `${ prefixErrorMessage } be of type ${ expectedType } . Current is ${ typeof cardinalDirection } `
536- ) . toBe ( expectedType ) ;
536+ ) . toBeTypeOf ( expectedType ) ;
537537 expect ( cardinalDirectionLength ) . lessThanOrEqual ( 2 ) ;
538538 } ) ;
539539 } ) ;
@@ -578,8 +578,8 @@ describe('address', () => {
578578 ) ;
579579
580580 expect ( coordinate . length ) . toBe ( 2 ) ;
581- expect ( typeof coordinate [ 0 ] ) . toBe ( 'string' ) ;
582- expect ( typeof coordinate [ 1 ] ) . toBe ( 'string' ) ;
581+ expect ( coordinate [ 0 ] ) . toBeTypeOf ( 'string' ) ;
582+ expect ( coordinate [ 1 ] ) . toBeTypeOf ( 'string' ) ;
583583
584584 const latFloat2 = parseFloat ( coordinate [ 0 ] ) ;
585585 expect ( latFloat2 ) . greaterThanOrEqual ( - 90.0 ) ;
@@ -616,8 +616,8 @@ describe('address', () => {
616616 ) ;
617617
618618 expect ( coordinate . length ) . toBe ( 2 ) ;
619- expect ( typeof coordinate [ 0 ] ) . toBe ( 'string' ) ;
620- expect ( typeof coordinate [ 1 ] ) . toBe ( 'string' ) ;
619+ expect ( coordinate [ 0 ] ) . toBeTypeOf ( 'string' ) ;
620+ expect ( coordinate [ 1 ] ) . toBeTypeOf ( 'string' ) ;
621621
622622 const distanceToTarget =
623623 Math . pow ( coordinate [ 0 ] - latitude , 2 ) +
@@ -640,8 +640,8 @@ describe('address', () => {
640640 ) ;
641641
642642 expect ( coordinate . length ) . toBe ( 2 ) ;
643- expect ( typeof coordinate [ 0 ] ) . toBe ( 'string' ) ;
644- expect ( typeof coordinate [ 1 ] ) . toBe ( 'string' ) ;
643+ expect ( coordinate [ 0 ] ) . toBeTypeOf ( 'string' ) ;
644+ expect ( coordinate [ 1 ] ) . toBeTypeOf ( 'string' ) ;
645645
646646 // const distanceToTarget =
647647 // Math.pow(coordinate[0] - latitude, 2) +
0 commit comments