Skip to content

Commit b87fd03

Browse files
simon300000Berkmann18
authored andcommitted
fix(repo): test lint (#204)
Fixes src/repo/__test__/github.js
1 parent 38211bd commit b87fd03

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/repo/__tests__/github.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,9 @@ test('Throw error when non existent username is provided', async () => {
8080
documentation_url:
8181
'https://developer.github.com/v3/users/#get-a-single-user',
8282
})
83-
try {
84-
await getUserInfo(username)
85-
} catch (error) {
86-
expect(error.message).toEqual(
87-
`Login not found when adding a contributor for username - ${username}.`,
88-
)
89-
}
83+
await expect(getUserInfo(username)).rejects.toThrow(
84+
`Login not found when adding a contributor for username - ${username}.`,
85+
)
9086
})
9187

9288
test('handle github errors', async () => {

0 commit comments

Comments
 (0)