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 group similar commits', async () => {
mockGroup([])
mockGroup([recycleCommit, secondRecycleCommit, lipstickCommit, secondLipstickCommit])
gitSemverTags.mockImplementation(cb => cb(null, ['v1.0.0']))
const { changes } = await generateChangelog(TAIL, HEAD, { groupSimilarCommits: true })
expect(changes[0].groups[0].commits).toEqual([
secondRecycleCommit,
{
...lipstickCommit,
siblings: [secondLipstickCommit],
},
recycleCommit,
])
})