mirror of
https://github.com/kiegroup/git-backporting.git
synced 2025-06-29 22:23:46 +00:00
feat: rebasing
feat: backport open prs
This commit is contained in:
commit
886fab70b3
53 changed files with 48467 additions and 0 deletions
17
test/support/utils.ts
Normal file
17
test/support/utils.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import * as core from "@actions/core";
|
||||
|
||||
export const addProcessArgs = (args: string[]) => {
|
||||
process.argv = [...process.argv, ...args];
|
||||
};
|
||||
|
||||
export const resetProcessArgs = () => {
|
||||
process.argv = ["node", "backporting"];
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export const spyGetInput = (obj: any) => {
|
||||
const mock = jest.spyOn(core, "getInput");
|
||||
mock.mockImplementation((name: string) : string => {
|
||||
return obj[name];
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue