fix: ci test

This commit is contained in:
Cheng Liu 2024-03-28 12:55:17 -07:00
parent 3ca49237c8
commit 4b6d99d014
No known key found for this signature in database
GPG key ID: EEC8452F7DB85CD6

View file

@ -26,7 +26,14 @@ describe(GitService.name, () => {
it('should get commit object type', async () => {
const gitService = await getFromContainerAsync(GitService);
const objectType = gitService.getObjectType('c48b5c0ceca929acd93e5a17b768c63c48eefc83');
// Shallow clone is used in CI builds, so getting the current commit SHA of HEAD
const commitSHA: string = gitService
.executeGitCommandAndCaptureOutput({
args: ['rev-parse', 'HEAD']
})
.trim();
expect(commitSHA).toBeTruthy();
const objectType = gitService.getObjectType(commitSHA);
expect(objectType).toBe('commit');
});
it('should get unknown object type', async () => {