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.
This commit is contained in:
parent
7c1a45a8d8
commit
3207bfd4ad
@ -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", () => {
|
||||
|
Reference in New Issue
Block a user