How to use the @gitmoji-changelog/core.generateChangelog.mockRejectedValue function in @gitmoji-changelog/core

To help you get started, we’ve selected a few @gitmoji-changelog/core 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 / cli.spec.js View on Github external
it('should throw an error if changelog generation fails', async () => {
    generateChangelog.mockRejectedValue(new Error())

    await main(options)

    expect(logger.error).toHaveBeenCalled()
  })