mirror of
https://github.com/cdr/code-server.git
synced 2025-12-06 16:34:35 +01:00
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
1 changed files with 3 additions and 0 deletions
|
|
@ -446,6 +446,9 @@ describe("isFile", () => {
|
||||||
it("should return true if is file", async () => {
|
it("should return true if is file", async () => {
|
||||||
expect(await util.isFile(pathToFile)).toBe(true)
|
expect(await util.isFile(pathToFile)).toBe(true)
|
||||||
})
|
})
|
||||||
|
it("should return false if error", async () => {
|
||||||
|
expect(await util.isFile("fakefile.txt")).toBe(false)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("humanPath", () => {
|
describe("humanPath", () => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue