mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
fix bun-write test
This commit is contained in:
@@ -452,9 +452,15 @@ describe("ENOENT", () => {
|
||||
|
||||
it("throws when given a file descriptor", async () => {
|
||||
const file = Bun.file(123);
|
||||
expect(async () => await Bun.write(file, "contents", { createPath: true })).rejects.toThrow(
|
||||
"Cannot create a directory for a file descriptor",
|
||||
);
|
||||
if (process.env.BUN_POLYFILLS_TEST_RUNNER) {
|
||||
expect(async () => await Bun.write(file, "contents", { createPath: true })).rejects.toThrow(
|
||||
"Cannot create a directory for a file descriptor",
|
||||
);
|
||||
} else {
|
||||
expect(async () => await Bun.write(file, "contents", { createPath: true })).toThrow(
|
||||
"Cannot create a directory for a file descriptor",
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user