From 5590633fc153b09ded976569bae1836eb3eab8e8 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 9 May 2022 22:59:24 +0000 Subject: [PATCH] feat: add test for isFile when error 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 a86e9d066cef..1455a7e07700 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", () => {