From 3207bfd4ada744be29e82e047916c174c96688a2 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 9 May 2022 16:24:40 -0700 Subject: [PATCH] feat: add test for isFile when error (#5182) This adds an additional test for the `isFile` utility function to ensure it returns `false` in the event of an error. --- test/unit/node/util.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unit/node/util.test.ts b/test/unit/node/util.test.ts index a86e9d066..1455a7e07 100644 --- a/test/unit/node/util.test.ts +++ b/test/unit/node/util.test.ts @@ -446,6 +446,9 @@ describe("isFile", () => { it("should return true if is file", async () => { expect(await util.isFile(pathToFile)).toBe(true) }) + it("should return false if error", async () => { + expect(await util.isFile("fakefile.txt")).toBe(false) + }) }) describe("humanPath", () => {