added some tests

This commit is contained in:
2016-11-22 22:22:24 +01:00
parent 29d176bafa
commit 15c331690b
9 changed files with 99 additions and 36 deletions

View File

@@ -24,7 +24,8 @@ export let createRepoFromClone = (fromArg: string, toArg: string) => {
export let createRepoFromInit = (destinationDirArg: string) => {
let done = q.defer<GitRepo>()
plugins.smartfile.fs.ensureDir(destinationDirArg)
plugins.shelljs.exec(`cd destinationDirArg && git init`)
plugins.shelljs.exec(`cd ${destinationDirArg} && git init`)
let newRepo = new GitRepo(destinationDirArg)
done.resolve(newRepo)
return done.promise
}