Skip to content

Commit 5590633

Browse files
committed
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.
1 parent 7c1a45a commit 5590633

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/unit/node/util.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,9 @@ describe("isFile", () => {
446446
it("should return true if is file", async () => {
447447
expect(await util.isFile(pathToFile)).toBe(true)
448448
})
449+
it("should return false if error", async () => {
450+
expect(await util.isFile("fakefile.txt")).toBe(false)
451+
})
449452
})
450453

451454
describe("humanPath", () => {

0 commit comments

Comments
 (0)