Initial BPer implementation

This commit is contained in:
Andrea Lamparelli 2022-12-22 13:14:37 +01:00
parent 05d156a5b0
commit f0d9f789fa
59 changed files with 33618 additions and 1048 deletions

17
test/support/utils.ts Normal file
View 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];
});
};