diff options
Diffstat (limited to 'test/bun.js/fs.test.js')
-rw-r--r-- | test/bun.js/fs.test.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/bun.js/fs.test.js b/test/bun.js/fs.test.js index 80622f895..304232954 100644 --- a/test/bun.js/fs.test.js +++ b/test/bun.js/fs.test.js @@ -231,6 +231,18 @@ describe("readFileSync", () => { expect(text).toBe("File read successfully"); }); + it("works with special files in the filesystem", () => { + { + const text = readFileSync("/dev/null", "utf8"); + expect(text).toBe(""); + } + + if (process.platform === "linux") { + const text = readFileSync("/proc/filesystems"); + expect(text.length > 0).toBe(true); + } + }); + it("returning Buffer works", () => { const text = readFileSync(import.meta.dir + "/readFileSync.txt"); const encoded = [ |