From 162899310fbc5faa6e77bc945a3942f849cf5854 Mon Sep 17 00:00:00 2001 From: Rosanny <rosanny.sihombing@hft-stuttgart.de> Date: Thu, 25 Mar 2021 09:26:54 +0100 Subject: [PATCH] remove unused codes --- __tests__/gitlab.unit.test.js | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/__tests__/gitlab.unit.test.js b/__tests__/gitlab.unit.test.js index 8c453038..5159e0b2 100644 --- a/__tests__/gitlab.unit.test.js +++ b/__tests__/gitlab.unit.test.js @@ -3,34 +3,6 @@ const gitlab = require('../routes/gitlab') //jest.mock('axios') describe('GitLab API', () => { - - /* - test('jest.fn recalls what it has been called with', () => { - const mock = jest.fn() - mock('a', 'b', 'c') - expect(mock).toHaveBeenCalledTimes(1) - expect(mock).toHaveBeenCalledWith('a', 'b', 'c') - }); */ - - // mock -/* it('returns an existing gitlab-userID by an email address', done => { - let resp = { - error: false, - data: 1} - axios.get.mockResolvedValue(resp) - - gitlab.getUserIdByEmail('rosanny.sihombing@hft-stuttgart.de', function(resp){ - try { - expect(resp.error).toBeFalsy() - expect(resp.data).not.toBeNull() - done() - } catch (error) { - done(error) - } - }) - }) -*/ - test('returns an existing gitlab user by an email address', async () => { let user = await gitlab.getUserByEmail('putavaliduseremailaddress@here.com') expect(user).not.toBeNull() @@ -57,5 +29,4 @@ describe('GitLab API', () => { let project = await gitlab.getProjectById(0) expect(project).toBeUndefined() }) - }) \ No newline at end of file -- GitLab