Skip to content

Commit

Permalink
feat: Expose repo.path
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Apr 20, 2016
1 parent 5d29951 commit 35c5155
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ function Repo (repoPath, options) {
}
}

this.path = repoPath

this.init = (config, callback) => {
this.exists((err, exists) => {
if (err) { throw err }
Expand Down
4 changes: 4 additions & 0 deletions test/repo-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ module.exports = function (repo) {
})
})

it('exposes the path', () => {
expect(typeof repo.path).to.be.equal('string')
})

describe('locks', () => {
it('lock, unlock', (done) => {
repo.locks.lock((err) => {
Expand Down

0 comments on commit 35c5155

Please sign in to comment.