An error occurred while loading the file. Please try again.
-
Kurzenberger authored84146035
import { helpers } from '../src/utils/helpers'
import { gitlab } from '../src/controller/gitlab'
test('[/utils/helpers] convert string to array', () => {
expect(helpers.stringToArray('foo')).toStrictEqual(['foo'])
expect(helpers.stringToArray('foo,bar')).toStrictEqual(['foo', 'bar'])
expect(helpers.stringToArray('')).toBeNull
expect(helpers.stringToArray(String(null))).toBeNull
})
test('[/controller/gitlab] get projects from gitlab', async () => {
expect(await gitlab.getProjects(100, 0)).not.toBeNull
})
test('[/controller/gitlab] get latest pipeline status from gitlab', async () => {
expect(await gitlab.getLatestPipelineStatus(97)).toBe('success')
expect(await gitlab.getLatestPipelineStatus(0)).toBeFalsy
})