mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-23 14:38:35 +02:00
Add test coverage for #734
This commit is contained in:
parent
362b8c9464
commit
c765e476d5
1 changed files with 14 additions and 0 deletions
|
@ -60,6 +60,13 @@ describe('Git', function() {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Switches', function() {
|
||||||
|
return expectTreeAsync(
|
||||||
|
'git switch -c side',
|
||||||
|
'{"branches":{"master":{"target":"C1","id":"master"},"side":{"target":"C1","id":"side"}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"}},"HEAD":{"target":"side","id":"HEAD"}}'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it('Rebases', function() {
|
it('Rebases', function() {
|
||||||
return expectTreeAsync(
|
return expectTreeAsync(
|
||||||
'gc; git checkout -b side C1; gc; git rebase master',
|
'gc; git checkout -b side C1; gc; git rebase master',
|
||||||
|
@ -172,6 +179,13 @@ describe('Git', function() {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('switches after a rebase ', function() {
|
||||||
|
return expectTreeAsync(
|
||||||
|
'git commit; git switch -c bugFix C1; git commit; git rebase master;git switch master',
|
||||||
|
'%7B%22branches%22%3A%7B%22master%22%3A%7B%22target%22%3A%22C2%22%2C%22id%22%3A%22master%22%7D%2C%22bugFix%22%3A%7B%22target%22%3A%22C3%27%22%2C%22id%22%3A%22bugFix%22%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22parents%22%3A%5B%5D%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22parents%22%3A%5B%22C0%22%5D%2C%22id%22%3A%22C1%22%7D%2C%22C2%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C2%22%7D%2C%22C3%22%3A%7B%22parents%22%3A%5B%22C1%22%5D%2C%22id%22%3A%22C3%22%7D%2C%22C3%27%22%3A%7B%22parents%22%3A%5B%22C2%22%5D%2C%22id%22%3A%22C3%27%22%7D%7D%2C%22HEAD%22%3A%7B%22target%22%3A%22master%22%2C%22id%22%3A%22HEAD%22%7D%7D'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it('checks out after an interactive rebase', function() {
|
it('checks out after an interactive rebase', function() {
|
||||||
return expectTreeAsync(
|
return expectTreeAsync(
|
||||||
'git commit; git checkout -b bugFix C1; git commit; git rebase -i master --interactive-test;git checkout master',
|
'git commit; git checkout -b bugFix C1; git commit; git rebase -i master --interactive-test;git checkout master',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue