diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-09-11 07:19:34 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-11 07:19:34 +1000 |
commit | a69b1e699ef76568a4a3da47939134abda545ec7 (patch) | |
tree | 951091db6743b2cd0a4e726f2d784386882a3dc3 /tests/unit | |
parent | f9007d3386bbe9f709ce413ac0cf099b86d4c4bf (diff) |
BREAKING(fs): remove `Deno.FsFile.prototype.rid` (#25499)
Towards #22079
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/files_test.ts | 1 | ||||
-rw-r--r-- | tests/unit/process_test.ts | 14 |
2 files changed, 6 insertions, 9 deletions
diff --git a/tests/unit/files_test.ts b/tests/unit/files_test.ts index 6692415d4..3bbfc3855 100644 --- a/tests/unit/files_test.ts +++ b/tests/unit/files_test.ts @@ -26,7 +26,6 @@ Deno.test( const filename = "tests/testdata/assets/fixture.json"; using file = await Deno.open(filename); assert(file instanceof Deno.FsFile); - assert(file.rid > 2); const bytesWritten = await copy(file, Deno.stdout); const fileSize = Deno.statSync(filename).size; assertEquals(bytesWritten, fileSize); diff --git a/tests/unit/process_test.ts b/tests/unit/process_test.ts index 93736e9ba..5cbab3b4c 100644 --- a/tests/unit/process_test.ts +++ b/tests/unit/process_test.ts @@ -6,7 +6,6 @@ import { assertStrictEquals, assertStringIncludes, assertThrows, - DENO_FUTURE, } from "./test_util.ts"; Deno.test( @@ -363,8 +362,6 @@ Deno.test( Deno.test( { - // Ignoring because uses `file.rid` - ignore: DENO_FUTURE, permissions: { run: true, write: true, read: true }, }, async function runRedirectStdoutStderr() { @@ -382,10 +379,12 @@ Deno.test( "eval", "Deno.stderr.write(new TextEncoder().encode('error\\n')); Deno.stdout.write(new TextEncoder().encode('output\\n'));", ], - stdout: file.rid, - stderr: file.rid, + stdout: "piped", + stderr: "piped", }); + await p.stdout.readable.pipeTo(file.writable, { preventClose: true }); + await p.stderr.readable.pipeTo(file.writable); await p.status(); p.close(); @@ -402,8 +401,6 @@ Deno.test( Deno.test( { - // Ignoring because uses `file.rid` - ignore: DENO_FUTURE, permissions: { run: true, write: true, read: true }, }, async function runRedirectStdin() { @@ -425,9 +422,10 @@ Deno.test( } `, ], - stdin: file.rid, + stdin: "piped", }); + await file.readable.pipeTo(p.stdin.writable); const status = await p.status(); assertEquals(status.code, 0); p.close(); |