Skip to content

Commit 7b6e5ae

Browse files
authored
Added validation for using fetch with valid API
1 parent 8ce10a8 commit 7b6e5ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

__tests__/tests.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ test('Testing failure of Fetch with invalid API', () => {
3131
});
3232
});
3333

34-
test('Testing success of Fetch with valid API', async () => {
34+
test('Testing success of Fetch with valid API - 1', async () => {
3535
const data = await utils.fetchData("https://api.artic.edu/api/v1/artworks/129884");
3636
expect(data).toStrictEqual(expect.anything());
3737
});
38+
39+
test('Testing success of Fetch with valid API - 2', async () => {
40+
const data = await utils.fetchData("https://api.genderize.io/?name=peter");
41+
expect(data).toStrictEqual(expect.anything());
42+
});

0 commit comments

Comments
 (0)