Archived
1
0

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:
Joe Previte 2022-05-09 16:24:40 -07:00 committed by GitHub
parent 7c1a45a8d8
commit 3207bfd4ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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", () => {