Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions __tests__/utils/command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ describe('clone', () => {
'git fetch --no-tags origin \'refs/heads/hello-world/test-branch:refs/remotes/origin/hello-world/test-branch\' || :',
'git reset --hard || :',
'git checkout -b hello-world/test-branch origin/hello-world/test-branch || :',
'git checkout hello-world/test-branch || :',
]);
stdoutCalledWith(mockStdout, [
'::group::Fetching...',
Expand All @@ -122,6 +123,8 @@ describe('clone', () => {
'::group::Switching branch to [hello-world/test-branch]...',
'[command]git checkout -b hello-world/test-branch origin/hello-world/test-branch',
' >> stdout',
'[command]git checkout hello-world/test-branch',
' >> stdout',
]);
});
});
Expand Down Expand Up @@ -158,12 +161,11 @@ describe('checkBranch', () => {
}))).toBe(false);

execCalledWith(mockExec, [
'git rev-parse --abbrev-ref HEAD || :',
'git checkout hello-world/test-branch || :',
'git rev-parse --abbrev-ref HEAD || :',
'git remote add origin \'https://octocat:test-token@github.com/hello/world.git\' > /dev/null 2>&1 || :',
'git fetch --no-tags origin \'refs/heads/feature/new-feature:refs/remotes/origin/feature/new-feature\' || :',
'git checkout -b feature/new-feature origin/feature/new-feature || :',
'git checkout feature/new-feature || :',
'git checkout -b hello-world/test-branch',
'ls -la',
]);
Expand Down Expand Up @@ -368,6 +370,7 @@ describe('getChangedFiles', () => {
'::endgroup::',
'::group::Switching branch to [hello-world/test-branch]...',
'[command]git checkout -b hello-world/test-branch origin/hello-world/test-branch',
'[command]git checkout hello-world/test-branch',
'[command]git rev-parse --abbrev-ref HEAD',
' >> hello-world/test-branch',
'[command]git merge --no-edit origin/hello-world/test-branch',
Expand Down Expand Up @@ -452,6 +455,7 @@ describe('getChangedFiles', () => {
'::endgroup::',
'::group::Switching branch to [hello-world/test-branch]...',
'[command]git checkout -b hello-world/test-branch origin/hello-world/test-branch',
'[command]git checkout hello-world/test-branch',
'[command]git rev-parse --abbrev-ref HEAD',
' >> hello-world/test-branch',
'[command]git merge --no-edit origin/hello-world/test-branch',
Expand Down Expand Up @@ -565,6 +569,7 @@ describe('getChangedFiles', () => {
'::endgroup::',
'::group::Switching branch to [hello-world/test-branch]...',
'[command]git checkout -b hello-world/test-branch origin/hello-world/test-branch',
'[command]git checkout hello-world/test-branch',
'[command]git rev-parse --abbrev-ref HEAD',
' >> hello-world/test-branch',
'[command]git merge --no-edit origin/hello-world/test-branch',
Expand Down Expand Up @@ -874,6 +879,7 @@ describe('resolveConflicts', () => {
'git remote add origin \'https://octocat:test-token@github.com/hello/world.git\' > /dev/null 2>&1 || :',
'git fetch --no-tags origin \'refs/heads/feature/new-feature:refs/remotes/origin/feature/new-feature\' || :',
'git checkout -b feature/new-feature origin/feature/new-feature || :',
'git checkout feature/new-feature || :',
'git checkout -b hello-world/test-branch',
'yarn upgrade',
'git add --all',
Expand Down Expand Up @@ -927,6 +933,7 @@ describe('resolveConflicts', () => {
'git remote add origin \'https://octocat:test-token@github.com/hello/world.git\' > /dev/null 2>&1 || :',
'git fetch --no-tags origin \'refs/heads/feature/new-feature:refs/remotes/origin/feature/new-feature\' || :',
'git checkout -b feature/new-feature origin/feature/new-feature || :',
'git checkout feature/new-feature || :',
'git checkout -b hello-world/test-branch',
'yarn upgrade',
'git add --all',
Expand Down
14 changes: 8 additions & 6 deletions __tests__/utils/process1.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ describe('execute', () => {
'[command]git reset --hard',
'> Switching branch to [change/new-topic1]...',
'[command]git checkout -b change/new-topic1 origin/change/new-topic1',
'[command]git checkout change/new-topic1',
'[command]git rev-parse --abbrev-ref HEAD',
' >> change/new-topic1',
'[command]git merge --no-edit origin/change/new-topic1',
Expand Down Expand Up @@ -200,8 +201,6 @@ describe('execute', () => {
'::endgroup::',
'::group::Switching branch to [Hello-World/test-21031067]...',
'[command]git checkout -b Hello-World/test-21031067 origin/Hello-World/test-21031067',
'[command]git rev-parse --abbrev-ref HEAD',
' >> test',
'[command]git checkout Hello-World/test-21031067',
'[command]git rev-parse --abbrev-ref HEAD',
' >> test',
Expand All @@ -212,6 +211,7 @@ describe('execute', () => {
'[command]git remote add origin',
'[command]git fetch --no-tags origin \'refs/heads/feature/new-feature:refs/remotes/origin/feature/new-feature\'',
'[command]git checkout -b feature/new-feature origin/feature/new-feature',
'[command]git checkout feature/new-feature',
'[command]git checkout -b Hello-World/test-21031067',
'[command]ls -la',
'::endgroup::',
Expand Down Expand Up @@ -285,8 +285,6 @@ describe('execute', () => {
'::group::Switching branch to [Hello-World/test-21031067]...',
'[command]git checkout -b Hello-World/test-21031067 origin/Hello-World/test-21031067',
' >> stdout',
'[command]git rev-parse --abbrev-ref HEAD',
' >> stdout',
'[command]git checkout Hello-World/test-21031067',
' >> stdout',
'[command]git rev-parse --abbrev-ref HEAD',
Expand All @@ -300,6 +298,8 @@ describe('execute', () => {
' >> stdout',
'[command]git checkout -b feature/new-feature origin/feature/new-feature',
' >> stdout',
'[command]git checkout feature/new-feature',
' >> stdout',
'[command]git checkout -b Hello-World/test-21031067',
' >> stdout',
'[command]ls -la',
Expand Down Expand Up @@ -427,6 +427,7 @@ describe('execute', () => {
'[command]git reset --hard',
'> Switching branch to [change/new-topic1]...',
'[command]git checkout -b change/new-topic1 origin/change/new-topic1',
'[command]git checkout change/new-topic1',
'[command]git rev-parse --abbrev-ref HEAD',
' >> change/new-topic1',
'[command]git merge --no-edit origin/change/new-topic1',
Expand Down Expand Up @@ -633,8 +634,6 @@ describe('execute', () => {
'::group::Switching branch to [Hello-World/test-21031067]...',
'[command]git checkout -b Hello-World/test-21031067 origin/Hello-World/test-21031067',
' >> stdout',
'[command]git rev-parse --abbrev-ref HEAD',
' >> stdout',
'[command]git checkout Hello-World/test-21031067',
' >> stdout',
'[command]git rev-parse --abbrev-ref HEAD',
Expand All @@ -648,6 +647,8 @@ describe('execute', () => {
' >> stdout',
'[command]git checkout -b feature/new-feature origin/feature/new-feature',
' >> stdout',
'[command]git checkout feature/new-feature',
' >> stdout',
'[command]git checkout -b Hello-World/test-21031067',
' >> stdout',
'[command]ls -la',
Expand Down Expand Up @@ -699,6 +700,7 @@ describe('execute', () => {
'::endgroup::',
'::group::Switching branch to [test/change]...',
'[command]git checkout -b test/change origin/test/change',
'[command]git checkout test/change',
'[command]git rev-parse --abbrev-ref HEAD',
' >> test/change',
'[command]git merge --no-edit origin/test/change',
Expand Down
Loading