Added .getReferenceTarget

This commit is contained in:
joshaber
2015-12-03 11:54:55 -05:00
parent c1e511927b
commit 70601772d0
2 changed files with 20 additions and 2 deletions

View File

@@ -485,4 +485,17 @@ describe('GitRepositoryAsync', () => {
expect(tags.length).toBe(0)
})
})
describe('.getReferenceTarget(reference, path)', () => {
let workingDirectory
beforeEach(() => {
workingDirectory = copyRepository()
repo = GitRepositoryAsync.open(workingDirectory)
})
it('returns the SHA target', async () => {
const SHA = await repo.getReferenceTarget('refs/heads/master')
expect(SHA).toBe('8a9c86f1cb1f14b8f436eb91f4b052c8802ca99e')
})
})
})