Commit 16289931 authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

remove unused codes

parent 4447a18e
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment