@inlang/paraglide-js
Version:
[](https://www.npmjs.com/package/@inlang/paraglide-js) [ => {
it("returns true if the file does exist", async () => {
const fs = memfs.Volume.fromNestedJSON({
"/test.txt": "hello",
}).promises;
const result = await pathExists("/test.txt", fs);
expect(result).toBe(true);
});
it("returns false if the file does not exist", async () => {
const fs = memfs.Volume.fromNestedJSON({
"/test.txt": "hello",
}).promises;
const result = await pathExists("/does-not-exist.txt", fs);
expect(result).toBe(false);
});
it("returns true if the path is a directory", async () => {
const fs = memfs.Volume.fromNestedJSON({
"/test/test.txt": "Hello",
}).promises;
const result = await pathExists("/test", fs);
expect(result).toBe(true);
});
});
//# sourceMappingURL=exists.test.js.map