Skip to content

Commit 1b4cdc7

Browse files
Jake ChampionJakeChampion
authored andcommitted
update test fixture
1 parent 179a037 commit 1b4cdc7

File tree

1 file changed

+20
-20
lines changed
  • integration-tests/js-compute/fixtures/geoip/bin

1 file changed

+20
-20
lines changed

integration-tests/js-compute/fixtures/geoip/bin/index.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ routes.set("/fastly/getgeolocationforipaddress/interface", async function () {
6767

6868
routes.set("/fastly/getgeolocationforipaddress/called-as-constructor", async () => {
6969
let error = assertThrows(() => {
70-
new fastly.getGeolocationForIpAddress('1.2.3.4')
70+
new fastly.getGeolocationForIpAddress('1.2.3.4')
7171
}, TypeError, `fastly.getGeolocationForIpAddress is not a constructor`)
7272
if (error) { return error }
7373
return pass()
@@ -76,21 +76,21 @@ routes.set("/fastly/getgeolocationforipaddress/called-as-constructor", async ()
7676
routes.set("/fastly/getgeolocationforipaddress/parameter-calls-7.1.17-ToString", async () => {
7777
let sentinel;
7878
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;
8483
}
85-
fastly.getGeolocationForIpAddress(key)
84+
}
85+
fastly.getGeolocationForIpAddress(key)
8686
}
8787
let error = assertThrows(test)
8888
if (error) { return error }
8989
try {
90-
test()
90+
test()
9191
} 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 }
9494
}
9595
error = assertThrows(() => {
9696
fastly.getGeolocationForIpAddress(Symbol())
@@ -100,14 +100,14 @@ routes.set("/fastly/getgeolocationforipaddress/parameter-calls-7.1.17-ToString",
100100
});
101101
routes.set("/fastly/getgeolocationforipaddress/parameter-not-supplied", async () => {
102102
let error = assertThrows(() => {
103-
fastly.getGeolocationForIpAddress()
103+
fastly.getGeolocationForIpAddress()
104104
}, TypeError, `fastly.getGeolocationForIpAddress: At least 1 argument required, but only 0 passed`)
105105
if (error) { return error }
106106
return pass()
107107
});
108108
routes.set("/fastly/getgeolocationforipaddress/parameter-empty-string", async () => {
109109
let error = assertThrows(() => {
110-
fastly.getGeolocationForIpAddress('')
110+
fastly.getGeolocationForIpAddress('')
111111
}, Error, `Invalid address passed to fastly.getGeolocationForIpAddress`)
112112
if (error) { return error }
113113
return pass()
@@ -117,21 +117,21 @@ let ipv4Expected = {
117117
as_name: "sky uk limited",
118118
as_number: 5607,
119119
area_code: 0,
120-
city: "haringey",
120+
city: "tower hamlets",
121121
conn_speed: "broadband",
122122
conn_type: "wifi",
123123
continent: "EU",
124124
country_code: "GB",
125125
country_code3: "GBR",
126126
country_name: "united kingdom",
127127
gmt_offset: 0,
128-
latitude: 51.59,
129-
longitude: -0.08,
128+
latitude: 51.52,
129+
longitude: -0.06,
130130
metro_code: 826044,
131-
postal_code: "n15 4sj",
131+
postal_code: "e1 5bt",
132132
proxy_description: "?",
133133
proxy_type: "?",
134-
region: "HRY",
134+
region: "TWH",
135135
utc_offset: 0
136136
};
137137

@@ -153,19 +153,19 @@ let expected = {
153153
country_code: "US",
154154
country_code3: "USA",
155155
country_name: "united states",
156-
gmt_offset: -500,
156+
gmt_offset: -600,
157157
latitude: 32.94,
158158
longitude: -96.84,
159159
metro_code: 623,
160160
postal_code: "75244",
161161
proxy_description: "?",
162162
proxy_type: "hosting",
163163
region: "TX",
164-
utc_offset: -500
164+
utc_offset: -600
165165
}
166166
routes.set("/fastly/getgeolocationforipaddress/parameter-compressed-ipv6-string", async () => {
167167
let geo = fastly.getGeolocationForIpAddress('2607:f0d0:1002:51::4')
168-
console.log({geo})
168+
console.log({ geo })
169169
let error = assert(geo, expected, `fastly.getGeolocationForIpAddress('2607:f0d0:1002:51::4') == expected`)
170170
if (error) { return error }
171171
return pass()

0 commit comments

Comments
 (0)