test: fix process.argv reset during cli tests (#60)

This commit is contained in:
Andrea Lamparelli 2023-07-11 22:43:22 +02:00 committed by GitHub
parent 49a7350406
commit 91782505ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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();