How to use the git-remote-origin-url.mockImplementationOnce function in git-remote-origin-url

To help you get started, we’ve selected a few git-remote-origin-url examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github frinyvonnick / gitmoji-changelog / packages / gitmoji-changelog-cli / src / repository.spec.js View on Github external
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,
    })
  })
})

git-remote-origin-url

Get the remote origin URL of a Git repository

MIT
Latest version published 3 years ago

Package Health Score

67 / 100
Full package analysis

Popular git-remote-origin-url functions