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

@ -60,6 +60,9 @@ afterAll(() => {
});
beforeEach(() => {
// reset process.env variables
resetProcessArgs();
// create CLI arguments parser
parser = new CLIArgsParser();
@ -67,13 +70,7 @@ beforeEach(() => {
runner = new Runner(parser);
});
afterEach(() => {
// reset process.env variables
resetProcessArgs();
});
describe("cli runner", () => {
test("with dry run", async () => {
addProcessArgs([
"-d",