Skip to content

Commit

Permalink
Use git rev-parse (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Jun 23, 2019
1 parent 4079060 commit de75acb
Show file tree
Hide file tree
Showing 8 changed files with 224 additions and 259 deletions.
6 changes: 0 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Expand Up @@ -50,7 +50,6 @@
"dependencies": {
"cosmiconfig": "^5.2.0",
"execa": "^1.0.0",
"find-up": "^3.0.0",
"get-stdin": "^7.0.0",
"is-ci": "^2.0.0",
"pkg-dir": "^4.1.0",
Expand All @@ -61,7 +60,6 @@
},
"devDependencies": {
"@types/cosmiconfig": "^5.0.3",
"@types/find-up": "^2.1.1",
"@types/jest": "^24.0.13",
"@types/mkdirp": "^0.5.2",
"@types/node": "^12.0.1",
Expand Down
13 changes: 13 additions & 0 deletions src/installer/__tests__/gitRevParse.ts
@@ -0,0 +1,13 @@
import path from 'path'
import slash from 'slash'
import gitRevParse from '../gitRevParse'

describe('gitRevParse', (): void => {
it('should return topLevel and gitDir', (): void => {
expect(gitRevParse()).toStrictEqual({
// Normalize
topLevel: slash(path.join(__dirname, '../../..')),
gitDir: '.git'
})
})
})

0 comments on commit de75acb

Please sign in to comment.