Chapter 8: verify
This commit is contained in:
@@ -7,3 +7,4 @@ module.exports.getGitHubUser = (username) => {
|
||||
return json;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -32,3 +32,4 @@ module.exports = {
|
||||
created_at: "2013-01-30T18:13:42Z",
|
||||
updated_at: "2020-06-09T20:53:23Z",
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ test("Get GitHub user by username", async function (t) {
|
||||
|
||||
sinon.stub(github, "getGitHubUser").returns(octokitUserData);
|
||||
|
||||
const githubUser = await github.getGitHubUser("bethgriggs");
|
||||
const githubUser = await github.getGitHubUser("octokit");
|
||||
|
||||
t.equal(githubUser.id, 3430433);
|
||||
t.equal(githubUser.login, "octokit");
|
||||
|
||||
Reference in New Issue
Block a user