From 0eacb326f23dffee5b1fce1c0e4b08b54873d483 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 22 Feb 2022 15:11:54 -0700 Subject: [PATCH 1/2] feat(testing): add new test for cli.ts --- test/unit/node/cli.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unit/node/cli.test.ts b/test/unit/node/cli.test.ts index 57d19317ded4..d5a0fbbfe2d6 100644 --- a/test/unit/node/cli.test.ts +++ b/test/unit/node/cli.test.ts @@ -371,6 +371,9 @@ describe("parser", () => { }), ).toThrowError(expectedErrMsg) }) + it("should not throw if an optional string is set to false", async () => { + expect(() => parse(["--cert=false"])).not.toThrowError() + }) }) describe("cli", () => { From c85ace5844f5e5cb5f27f11a330965488f11d457 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Tue, 22 Feb 2022 15:24:38 -0700 Subject: [PATCH 2/2] fixup!: update parse test --- test/unit/node/cli.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/node/cli.test.ts b/test/unit/node/cli.test.ts index d5a0fbbfe2d6..e8e2c85b2947 100644 --- a/test/unit/node/cli.test.ts +++ b/test/unit/node/cli.test.ts @@ -371,8 +371,8 @@ describe("parser", () => { }), ).toThrowError(expectedErrMsg) }) - it("should not throw if an optional string is set to false", async () => { - expect(() => parse(["--cert=false"])).not.toThrowError() + it("should ignore optional strings set to false", async () => { + expect(parse(["--cert=false"])).toEqual({}) }) })