Skip to content

Commit

Permalink
feat: add test for isFile when error (coder#5182)
Browse files Browse the repository at this point in the history
This adds an additional test for the `isFile` utility function to ensure
it returns `false` in the event of an error.
  • Loading branch information
jsjoeio committed May 9, 2022
1 parent 7c1a45a commit 3207bfd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/unit/node/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down

0 comments on commit 3207bfd

Please sign in to comment.