check verification status of head commit when not known

This commit is contained in:
Peter Evans 2024-08-17 22:01:12 +00:00
parent 32e97fc746
commit 1cd6df66ac
5 changed files with 77 additions and 16 deletions

View file

@ -1,4 +1,4 @@
import {GitCommandManager, Commit} from '../lib/git-command-manager'
import {GitCommandManager} from '../lib/git-command-manager'
const REPO_PATH = '/git/local/repos/test-base'
@ -14,11 +14,13 @@ describe('git-command-manager integration tests', () => {
const parent = await git.getCommit('HEAD^')
const commit = await git.getCommit('HEAD')
expect(parent.subject).toEqual('initial commit')
expect(parent.signed).toBeFalsy()
expect(parent.changes).toEqual([
{mode: '100644', status: 'A', path: 'README.md'}
])
expect(commit.subject).toEqual('add sparkles')
expect(commit.parents[0]).toEqual(parent.sha)
expect(commit.signed).toBeFalsy()
expect(commit.changes).toEqual([
{mode: '100644', status: 'M', path: 'README.md'}
])