From 0b0fb94ce2489da642cffd82e0498446d4a1fe1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 25 Jan 2024 23:51:29 +0100 Subject: fix(fs): instanceof check for Deno.FsFile (#22121) Regression caused by https://github.com/denoland/deno/pull/22072. I added a relevant test so we don't regress again. Fixes https://github.com/denoland/deno/issues/22115 --- cli/tests/unit/files_test.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cli/tests') diff --git a/cli/tests/unit/files_test.ts b/cli/tests/unit/files_test.ts index 150aa5c6e..a96f60a7a 100644 --- a/cli/tests/unit/files_test.ts +++ b/cli/tests/unit/files_test.ts @@ -19,6 +19,8 @@ Deno.test(function filesStdioFileDescriptors() { Deno.test({ permissions: { read: true } }, async function filesCopyToStdout() { const filename = "cli/tests/testdata/assets/fixture.json"; using file = await Deno.open(filename); + assert(file instanceof Deno.File); + assert(file instanceof Deno.FsFile); assert(file.rid > 2); const bytesWritten = await copy(file, Deno.stdout); const fileSize = Deno.statSync(filename).size; -- cgit v1.2.3