Skip to content

Commit 8718a2d

Browse files
Merge pull request #13 from andresWeitzel/bug-02-fix-get-data-from-address-tests
bug-02-fix-get-data-from-address-tests
2 parents a56e7e6 + 6dedf63 commit 8718a2d

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

src/api-integration/data/address/data-from-specific-address.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"continent_code": "NA",
77
"country": "United States",
88
"country_code": "US",
9-
"region": "California",
10-
"region_code": "CA",
11-
"city": "San Jose",
12-
"latitude": 37.3382082,
13-
"longitude": -121.8863286,
9+
"region": "District of Columbia",
10+
"region_code": "DC",
11+
"city": "Washington",
12+
"latitude": 38.9071923,
13+
"longitude": -77.0368707,
1414
"is_eu": false,
15-
"postal": "95113",
15+
"postal": "20500",
1616
"calling_code": "1",
1717
"capital": "Washington D.C.",
1818
"borders": "CA,MX",
@@ -28,11 +28,11 @@
2828
"domain": "cloudflare.com"
2929
},
3030
"timezone": {
31-
"id": "America/Los_Angeles",
32-
"abbr": "PDT",
33-
"is_dst": true,
34-
"offset": -25200,
35-
"utc": "-07:00",
36-
"current_time": "2023-10-17T19:27:04-07:00"
31+
"id": "America/New_York",
32+
"abbr": "EST",
33+
"is_dst": false,
34+
"offset": -18000,
35+
"utc": "-05:00",
36+
"current_time": "2024-01-25T16:38:46-05:00"
3737
}
3838
}

src/test/unit-test/api-integration/helpers/request/get-data-from-address.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,12 @@ describe("- getDataFromSpecificAddress helper (Unit Test)", () => {
4646
});
4747

4848
msg =
49-
"Should return a object type if a valid ip is passed (This function expects a single argument of string type)";
49+
"Should return a string type if a valid ip is passed (This function expects a single argument of string type)";
5050
it(msg, async () => {
5151
getDataFromSpecificAddressResult = await getDataFromSpecificAddress(
5252
MOCK_VALID_IP_VALUE_01
5353
);
54-
55-
console.log("SS656756565655"+getDataFromSpecificAddressResult);
56-
await expect(typeof getDataFromSpecificAddressResult == "object").toBe(
54+
await expect(typeof getDataFromSpecificAddressResult == "string").toBe(
5755
true
5856
);
5957
});

0 commit comments

Comments
 (0)