-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathtest.ts
More file actions
27 lines (26 loc) · 646 Bytes
/
Copy pathtest.ts
File metadata and controls
27 lines (26 loc) · 646 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import test from "ava"
import ipLocation from "./source"
test("main", async t => {
t.deepEqual(await ipLocation("172.217.167.78"), {
latitude: -33.8591,
longitude: 151.2002,
city: "Sydney",
reserved: false,
region: { name: "New South Wales", code: "NSW" },
country: {
name: "Australia",
code: "AU",
iso3: "AUS",
capital: "Canberra",
tld: ".au",
population: 21515754,
area: 7686850,
callingCode: "+61",
postalCode: "2000",
timezone: { code: "Australia/Sydney", offset: "+1000" },
currency: { name: "Dollar", code: "AUD" },
languages: ["en-AU"]
},
continent: { code: "OC", inEu: false }
})
})