Created
February 28, 2021 14:15
-
-
Save shridharkalagi/f6dc0d57efe71b5ffc8f7c7bd5a1c580 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fetch from 'node-fetch' | |
usersList = [ | |
'user1', | |
'user2', | |
... | |
'usern', | |
] | |
Object.values(usersList).forEach((user) => { | |
const url = 'https://api.github.com/users/' + user | |
const resposne = fetch(url, { | |
method: 'GET', | |
headers: {}, | |
}) | |
assert.equal(response.statuscode, 200, 'API call failed for user ' + user) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment