From b87fd034896adb51df7ecaf0a5340382e8fb231a Mon Sep 17 00:00:00 2001 From: simon3000 Date: Mon, 2 Sep 2019 18:15:43 +0200 Subject: [PATCH] fix(repo): test lint (#204) Fixes src/repo/__test__/github.js --- src/repo/__tests__/github.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/repo/__tests__/github.js b/src/repo/__tests__/github.js index 478d50aa..e43bf62b 100644 --- a/src/repo/__tests__/github.js +++ b/src/repo/__tests__/github.js @@ -80,13 +80,9 @@ test('Throw error when non existent username is provided', async () => { documentation_url: 'https://developer.github.com/v3/users/#get-a-single-user', }) - try { - await getUserInfo(username) - } catch (error) { - expect(error.message).toEqual( - `Login not found when adding a contributor for username - ${username}.`, - ) - } + await expect(getUserInfo(username)).rejects.toThrow( + `Login not found when adding a contributor for username - ${username}.`, + ) }) test('handle github errors', async () => {