Skip to content

Commit 41dabdd

Browse files
committed
Updated readme
1 parent 97babc1 commit 41dabdd

File tree

1 file changed

+31
-37
lines changed

1 file changed

+31
-37
lines changed

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

Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -54,47 +54,41 @@ describe("- getDataFromSpecificAddress helper (Unit Test)", () => {
5454
true
5555
);
5656
});
57-
// msg =
58-
// "Should return a object type if a valid argument is passed (This function expects a single argument)";
59-
// it(msg, async () => {
60-
// getDataFromSpecificAddressResult = await getDataFromSpecificAddress(
61-
// MOCK_STRING_VALUE
62-
// );
63-
// await expect(typeof getDataFromSpecificAddressResult == "object").toBe(true);
64-
// });
6557

66-
// msg =
67-
// "Should return a object type if two valid arguments are passed (This function expects a single argument)";
68-
// it(msg, async () => {
69-
// getDataFromSpecificAddressResult = await getDataFromSpecificAddress(
70-
// MOCK_STRING_VALUE,
71-
// MOCK_STRING_VALUE
72-
// );
73-
// await expect(typeof getDataFromSpecificAddressResult == "object").toBe(true);
74-
// });
75-
76-
// msg =
77-
// "Should return a string type if an invalid argument is passed (This function expects a single argument)";
78-
// it(msg, async () => {
79-
// getDataFromSpecificAddressResult = await getDataFromSpecificAddress(122212131);
80-
// await expect(typeof getDataFromSpecificAddressResult == "string").toBe(true);
81-
// });
82-
83-
// msg =
84-
// "Should return a string type if a null value is passed (This function expects a single argument)";
85-
// it(msg, async () => {
86-
// getDataFromSpecificAddressResult = await getDataFromSpecificAddress(null);
87-
// await expect(typeof getDataFromSpecificAddressResult == "string").toBe(true);
88-
// });
58+
msg =
59+
"Should return a string type if a null value is passed (This function expects a single argument of string type)";
60+
it(msg, async () => {
61+
getDataFromSpecificAddressResult = await getDataFromSpecificAddress(null);
62+
await expect(typeof getDataFromSpecificAddressResult == "string").toBe(
63+
true
64+
);
65+
});
8966

90-
// msg =
91-
// "Should return a string type if a undefined value is passed (This function expects a single argument)";
92-
// it(msg, async () => {
93-
// getDataFromSpecificAddressResult = await getDataFromSpecificAddress(undefined);
94-
// await expect(typeof getDataFromSpecificAddressResult == "string").toBe(true);
95-
// });
67+
msg =
68+
"Should return a string type if an undefined value is passed (This function expects a single argument of string type)";
69+
it(msg, async () => {
70+
getDataFromSpecificAddressResult = await getDataFromSpecificAddress(
71+
undefined
72+
);
73+
await expect(typeof getDataFromSpecificAddressResult == "string").toBe(
74+
true
75+
);
76+
});
9677
});
9778

79+
// describe("2) Check cases return cases.", () => {
80+
// msg =
81+
// "Should return a object type with data attribute if a valid ip is passed (This function expects a single argument of string type)";
82+
// it(msg, async () => {
83+
// getDataFromSpecificAddressResult = await getDataFromSpecificAddress(
84+
// MOCK_VALID_IP_VALUE
85+
// );
86+
// // await expect(typeof getDataFromSpecificAddressResult == "string").toBe(
87+
// // true
88+
// // );
89+
// });
90+
// });
91+
9892
// describe("2) Check cases for error.", () => {
9993
// msg =
10094
// "Should not return a error message and not throw an error if no argument is passed to the function.";

0 commit comments

Comments
 (0)