@@ -67,7 +67,7 @@ routes.set("/fastly/getgeolocationforipaddress/interface", async function () {
67
67
68
68
routes . set ( "/fastly/getgeolocationforipaddress/called-as-constructor" , async ( ) => {
69
69
let error = assertThrows ( ( ) => {
70
- new fastly . getGeolocationForIpAddress ( '1.2.3.4' )
70
+ new fastly . getGeolocationForIpAddress ( '1.2.3.4' )
71
71
} , TypeError , `fastly.getGeolocationForIpAddress is not a constructor` )
72
72
if ( error ) { return error }
73
73
return pass ( )
@@ -76,21 +76,21 @@ routes.set("/fastly/getgeolocationforipaddress/called-as-constructor", async ()
76
76
routes . set ( "/fastly/getgeolocationforipaddress/parameter-calls-7.1.17-ToString" , async ( ) => {
77
77
let sentinel ;
78
78
const test = ( ) => {
79
- sentinel = Symbol ( ) ;
80
- const key = {
81
- toString ( ) {
82
- throw sentinel ;
83
- }
79
+ sentinel = Symbol ( ) ;
80
+ const key = {
81
+ toString ( ) {
82
+ throw sentinel ;
84
83
}
85
- fastly . getGeolocationForIpAddress ( key )
84
+ }
85
+ fastly . getGeolocationForIpAddress ( key )
86
86
}
87
87
let error = assertThrows ( test )
88
88
if ( error ) { return error }
89
89
try {
90
- test ( )
90
+ test ( )
91
91
} catch ( thrownError ) {
92
- let error = assert ( thrownError , sentinel , 'thrownError === sentinel' )
93
- if ( error ) { return error }
92
+ let error = assert ( thrownError , sentinel , 'thrownError === sentinel' )
93
+ if ( error ) { return error }
94
94
}
95
95
error = assertThrows ( ( ) => {
96
96
fastly . getGeolocationForIpAddress ( Symbol ( ) )
@@ -100,14 +100,14 @@ routes.set("/fastly/getgeolocationforipaddress/parameter-calls-7.1.17-ToString",
100
100
} ) ;
101
101
routes . set ( "/fastly/getgeolocationforipaddress/parameter-not-supplied" , async ( ) => {
102
102
let error = assertThrows ( ( ) => {
103
- fastly . getGeolocationForIpAddress ( )
103
+ fastly . getGeolocationForIpAddress ( )
104
104
} , TypeError , `fastly.getGeolocationForIpAddress: At least 1 argument required, but only 0 passed` )
105
105
if ( error ) { return error }
106
106
return pass ( )
107
107
} ) ;
108
108
routes . set ( "/fastly/getgeolocationforipaddress/parameter-empty-string" , async ( ) => {
109
109
let error = assertThrows ( ( ) => {
110
- fastly . getGeolocationForIpAddress ( '' )
110
+ fastly . getGeolocationForIpAddress ( '' )
111
111
} , Error , `Invalid address passed to fastly.getGeolocationForIpAddress` )
112
112
if ( error ) { return error }
113
113
return pass ( )
@@ -117,21 +117,21 @@ let ipv4Expected = {
117
117
as_name : "sky uk limited" ,
118
118
as_number : 5607 ,
119
119
area_code : 0 ,
120
- city : "haringey " ,
120
+ city : "tower hamlets " ,
121
121
conn_speed : "broadband" ,
122
122
conn_type : "wifi" ,
123
123
continent : "EU" ,
124
124
country_code : "GB" ,
125
125
country_code3 : "GBR" ,
126
126
country_name : "united kingdom" ,
127
127
gmt_offset : 0 ,
128
- latitude : 51.59 ,
129
- longitude : - 0.08 ,
128
+ latitude : 51.52 ,
129
+ longitude : - 0.06 ,
130
130
metro_code : 826044 ,
131
- postal_code : "n15 4sj " ,
131
+ postal_code : "e1 5bt " ,
132
132
proxy_description : "?" ,
133
133
proxy_type : "?" ,
134
- region : "HRY " ,
134
+ region : "TWH " ,
135
135
utc_offset : 0
136
136
} ;
137
137
@@ -153,19 +153,19 @@ let expected = {
153
153
country_code : "US" ,
154
154
country_code3 : "USA" ,
155
155
country_name : "united states" ,
156
- gmt_offset : - 500 ,
156
+ gmt_offset : - 600 ,
157
157
latitude : 32.94 ,
158
158
longitude : - 96.84 ,
159
159
metro_code : 623 ,
160
160
postal_code : "75244" ,
161
161
proxy_description : "?" ,
162
162
proxy_type : "hosting" ,
163
163
region : "TX" ,
164
- utc_offset : - 500
164
+ utc_offset : - 600
165
165
}
166
166
routes . set ( "/fastly/getgeolocationforipaddress/parameter-compressed-ipv6-string" , async ( ) => {
167
167
let geo = fastly . getGeolocationForIpAddress ( '2607:f0d0:1002:51::4' )
168
- console . log ( { geo} )
168
+ console . log ( { geo } )
169
169
let error = assert ( geo , expected , `fastly.getGeolocationForIpAddress('2607:f0d0:1002:51::4') == expected` )
170
170
if ( error ) { return error }
171
171
return pass ( )
0 commit comments