From 824038db8ba5d877ebe1b0c09ae6c2a994978ba7 Mon Sep 17 00:00:00 2001 From: akash1810 Date: Tue, 19 Dec 2023 11:17:36 +0000 Subject: [PATCH] test: Unit test `removeUndefined` with "0" input --- cli/transform_test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cli/transform_test.ts b/cli/transform_test.ts index 852e40e..ae0aad0 100644 --- a/cli/transform_test.ts +++ b/cli/transform_test.ts @@ -40,3 +40,13 @@ Deno.test("removeUndefined", () => { }; assertEquals(got, want); }); + +Deno.test("removeUndefined where the RHS is 0", () => { + const got = removeUndefined({ + errors: "0", + }); + const want = { + errors: "0", + }; + assertEquals(got, want); +});