Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
16289931
Commit
16289931
authored
Mar 25, 2021
by
Rosanny Sihombing
Browse files
remove unused codes
parent
4447a18e
Changes
1
Hide whitespace changes
Inline
Side-by-side
__tests__/gitlab.unit.test.js
View file @
16289931
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment