Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should extract bitbucket repo info', async () => {
gitRemoteOriginUrl.mockImplementationOnce(() => Promise.resolve('https://username@bitbucket.org/bitbucket-account/bitbucket-project.git'))
const result = await getRepositoryInfo()
expect(result).toEqual({
type: 'bitbucket',
domain: 'bitbucket.org',
user: 'bitbucket-account',
project: 'bitbucket-project',
url: 'https://bitbucket.org/bitbucket-account/bitbucket-project',
bugsUrl: undefined,
})
})
})