mirror of
https://github.com/danog/gift.git
synced 2024-11-30 04:19:37 +01:00
Improve tests
This commit is contained in:
parent
d6ed167156
commit
eaf7a6f2ee
@ -697,9 +697,23 @@ describe "Repo", ->
|
||||
fs.remove git_dir, (err) ->
|
||||
done err
|
||||
|
||||
describe "an existing branch", ->
|
||||
beforeEach (done) ->
|
||||
repo.checkout "feature/foo", {b: true}, (err) ->
|
||||
return done err if err?
|
||||
repo.checkout "master", (err) ->
|
||||
return done err if err?
|
||||
repo.branch (err, _head) ->
|
||||
head = _head
|
||||
done err
|
||||
|
||||
it "should succeed", ->
|
||||
head.name.should.equal "master"
|
||||
|
||||
describe "and create new branch", ->
|
||||
beforeEach (done) ->
|
||||
repo.checkout "feature/foo", {b: true}, ->
|
||||
repo.checkout "feature/foo", {b: true}, (err) ->
|
||||
return done err if err?
|
||||
repo.branch (err, _head) ->
|
||||
head = _head
|
||||
done err
|
||||
|
Loading…
Reference in New Issue
Block a user