aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/fs/fs.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/js/node/fs/fs.test.ts')
-rw-r--r--test/js/node/fs/fs.test.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/js/node/fs/fs.test.ts b/test/js/node/fs/fs.test.ts
index a3522b486..cdd14bb01 100644
--- a/test/js/node/fs/fs.test.ts
+++ b/test/js/node/fs/fs.test.ts
@@ -1307,7 +1307,8 @@ describe("fs.WriteStream", () => {
});
it("should use fd if provided", () => {
- const path = join(tmpdir(), "/not-used.txt");
+ const path = join(tmpdir(), `not-used-${Date.now()}.txt`);
+ expect(existsSync(path)).toBe(false);
// @ts-ignore-next-line
const ws = new WriteStream_(path, {
fd: 2,
@@ -1419,7 +1420,8 @@ describe("fs.ReadStream", () => {
});
it("should use fd if provided", () => {
- const path = join(tmpdir(), "not-used.txt");
+ const path = join(tmpdir(), `not-used-${Date.now()}.txt`);
+ expect(existsSync(path)).toBe(false);
// @ts-ignore-next-line
const ws = new ReadStream_(path, {
fd: 0,