Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function testScenario(baseVerified, middleVerified, headVerified) {
const [baseCommit, middleCommit, headCommit] = [baseVerified, middleVerified, headVerified].map(createCommit);
const githubMock = new GitHubMock();
sinon.stub(githubMock.repos, 'compareCommits').resolves({
data: { commits: [headCommit, middleCommit, baseCommit] }
});
return assert.resolves(validateGpg(githubMock, new ContextMock(), baseCommit.commit.sha, headCommit.commit.sha));
}