test: fix process.argv reset during cli tests

This commit is contained in:
Andrea Lamparelli 2023-07-11 22:32:51 +02:00
parent 49a7350406
commit da1ce338e1
6 changed files with 15 additions and 18 deletions

View file

@ -63,11 +63,12 @@ describe("github pull request config parser", () => {
});
beforeEach(() => {
mockGitHubClient("http://localhost/api/v3");
// reset process.env variables
resetProcessArgs();
// mock octokit
mockGitHubClient("http://localhost/api/v3");
// create a fresh new instance every time
argsParser = new CLIArgsParser();
configParser = new PullRequestConfigsParser();