Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('returns pr url', async () => {
const create = jest.fn().mockImplementationOnce(() => ({
data: { number: 13, html_url: 'https://github.com/my/repo/pull/13' }, // eslint-disable-line camelcase
}));
Octokit.mockImplementationOnce(function() {
this.pulls = { create, createReviewRequest: jest.fn() };
});
const { pullRequestUrl } = await createPullRequest(getDefaultParams());
expect(pullRequestUrl).toEqual('https://github.com/my/repo/pull/13');
});