aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/fs
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-09-07 04:58:44 -0700
committerGravatar GitHub <noreply@github.com> 2023-09-07 04:58:44 -0700
commit57a06745a48093c25d0f4729ccea41a918d6427d (patch)
treeac2568d5c98918d6364d2a9667c164cd3f3b3867 /test/js/node/fs
parent4360ec83b4146e15344b304573795f084f86a7c2 (diff)
downloadbun-57a06745a48093c25d0f4729ccea41a918d6427d.tar.gz
bun-57a06745a48093c25d0f4729ccea41a918d6427d.tar.zst
bun-57a06745a48093c25d0f4729ccea41a918d6427d.zip
Progress for Next.js (#4468)
* L * ipc * asdfghjkl * dfghjk * it works! * types * patches for next.js * sdfghj * wsdfgn,./ * this * yolo * okay loser * asdfghjk * add some more APIs * MESS * sdfghjkl * remove native events from streams * stuff * remove lazy(primordials) test * debugging * okay * less fake extensions object * fix `Buffer.toString()` args logic * fix deserialize * make tests work * add test for `Buffer.toString` args * Update server.zig * remove test * update test * Update spawn-streaming-stdin.test.ts * fix linux build * Update fs.test.ts * cli message improvements * dfshaj * Fix fs.watch bug maybe? * remove --------- Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
Diffstat (limited to 'test/js/node/fs')
-rw-r--r--test/js/node/fs/fs.test.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/js/node/fs/fs.test.ts b/test/js/node/fs/fs.test.ts
index 2f898a2ea..0578e0fc7 100644
--- a/test/js/node/fs/fs.test.ts
+++ b/test/js/node/fs/fs.test.ts
@@ -2025,7 +2025,11 @@ it("BigIntStats", () => {
it("test syscall errno, issue#4198", () => {
const path = `${tmpdir()}/non-existent-${Date.now()}.txt`;
expect(() => openSync(path, "r")).toThrow("No such file or directory");
- expect(() => readSync(2147483640, Buffer.alloc(0))).toThrow("Bad file number");
+ if (process.platform == "darwin") {
+ expect(() => readSync(2147483640, Buffer.alloc(0))).toThrow("Bad file descriptor");
+ } else {
+ expect(() => readSync(2147483640, Buffer.alloc(0))).toThrow("Bad file number");
+ }
expect(() => readlinkSync(path)).toThrow("No such file or directory");
expect(() => realpathSync(path)).toThrow("No such file or directory");
expect(() => readFileSync(path)).toThrow("No such file or directory");
@@ -2034,10 +2038,10 @@ it("test syscall errno, issue#4198", () => {
expect(() => unlinkSync(path)).toThrow("No such file or directory");
expect(() => rmSync(path)).toThrow("No such file or directory");
expect(() => rmdirSync(path)).toThrow("No such file or directory");
- expect(() => closeSync(2147483640)).toThrow("Bad file number");
+ expect(() => closeSync(2147483640)).toThrow("Bad file descriptor");
mkdirSync(path);
expect(() => mkdirSync(path)).toThrow("File or folder exists");
- expect(() => unlinkSync(path)).toThrow("Is a directory");
+ expect(() => unlinkSync(path)).toThrow("Operation not permitted");
rmdirSync(path);
});