Created
November 7, 2021 15:00
-
-
Save ianaya89/74f3a55b015f42938ab10d628145f60d to your computer and use it in GitHub Desktop.
This file contains 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
const axios = require('axios') | |
const assert = require('assert') | |
async function run () { | |
const { data: users } = await axios.get('https://reqres.in/api/users') | |
assert.equal(users.data.length, 6) | |
const { data: user } = await axios.get('https://reqres.in/api/users/' + users.data[0].id) | |
assert.equal(user.data.first_name, 'George') | |
} | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment