fix: createBranch gitHelper function
Signed-off-by: RJ Decilos III <decilos_rj@yahoo.com>
This commit is contained in:
committed by
RJ Decilos III
parent
6000c69a25
commit
d103a48fa3
@@ -32,6 +32,7 @@ jest.mock('../scm', () => ({
|
||||
init: jest.fn(),
|
||||
add: jest.fn(),
|
||||
checkout: jest.fn(),
|
||||
branch: jest.fn(),
|
||||
commit: jest
|
||||
.fn()
|
||||
.mockResolvedValue('220f19cc36b551763d157f1b5e4a4b446165dbd6'),
|
||||
@@ -444,7 +445,7 @@ describe('createBranch', () => {
|
||||
});
|
||||
|
||||
it('create the branch', () => {
|
||||
expect(mockedGit.checkout).toHaveBeenCalledWith({
|
||||
expect(mockedGit.branch).toHaveBeenCalledWith({
|
||||
ref: 'trunk',
|
||||
dir: '/tmp/repo/dir/',
|
||||
});
|
||||
@@ -460,7 +461,7 @@ describe('createBranch', () => {
|
||||
},
|
||||
});
|
||||
|
||||
expect(mockedGit.checkout).toHaveBeenCalledWith({
|
||||
expect(mockedGit.branch).toHaveBeenCalledWith({
|
||||
ref: 'trunk',
|
||||
dir: '/tmp/repo/dir/',
|
||||
});
|
||||
|
||||
@@ -178,7 +178,7 @@ export async function createBranch(options: {
|
||||
logger,
|
||||
});
|
||||
|
||||
await git.checkout({ dir, ref });
|
||||
await git.branch({ dir, ref });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user