Added .getReferences

This commit is contained in:
joshaber
2015-12-03 11:44:31 -05:00
parent b60056f960
commit c1e511927b
2 changed files with 33 additions and 2 deletions

View File

@@ -470,4 +470,19 @@ describe('GitRepositoryAsync', () => {
expect(hasBranch).toBe(false)
})
})
describe('.getReferences(path)', () => {
let workingDirectory
beforeEach(() => {
workingDirectory = copyRepository()
repo = GitRepositoryAsync.open(workingDirectory)
})
it('returns the heads, remotes, and tags', async () => {
const {heads, remotes, tags} = await repo.getReferences()
expect(heads.length).toBe(1)
expect(remotes.length).toBe(0)
expect(tags.length).toBe(0)
})
})
})