build file changes even when there is no diff

This commit is contained in:
Peter Evans 2024-08-02 16:38:58 +00:00
parent 8101ce8ff4
commit 35dbaca7d5
3 changed files with 11 additions and 6 deletions

View file

@ -230,6 +230,13 @@ describe('create-or-update-branch tests', () => {
expect(workingBaseType).toEqual('commit')
})
it('tests buildBranchFileChanges with no diff', async () => {
await git.checkout(BRANCH, BASE)
const branchFileChanges = await buildBranchFileChanges(git, BASE, BRANCH)
expect(branchFileChanges.additions.length).toEqual(0)
expect(branchFileChanges.deletions.length).toEqual(0)
})
it('tests buildBranchFileChanges with addition and modification', async () => {
await git.checkout(BRANCH, BASE)
const changes = await createChanges()