From 114ec3c1f71b40bd4bba473b0187e7c664ed1755 Mon Sep 17 00:00:00 2001 From: Hirotaka Tagawa / wafuwafu13 Date: Wed, 24 May 2023 20:18:13 +0100 Subject: feat(ext/fs): add isBlockDevice, isCharDevice, isFifo, isSocket to FileInfo (#19008) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `isFile`, `isDirectory`, `isSymlink` are defined in `Deno.FileInfo`, but `isBlockDevice`, `isCharacterDevice`, `isFIFO`, `isSocket` are not defined. --------- Co-authored-by: Bartek IwaƄczuk --- cli/tests/integration/lsp_tests.rs | 2 +- cli/tests/unit/stat_test.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'cli/tests') diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs index db009999b..4ddf5d4e3 100644 --- a/cli/tests/integration/lsp_tests.rs +++ b/cli/tests/integration/lsp_tests.rs @@ -4715,7 +4715,7 @@ fn lsp_completions_auto_import() { "source": "./b.ts", "data": { "exportName": "foo", - "exportMapKey": "foo|6806|file:///a/b", + "exportMapKey": "foo|6810|file:///a/b", "moduleSpecifier": "./b.ts", "fileName": "file:///a/b.ts" }, diff --git a/cli/tests/unit/stat_test.ts b/cli/tests/unit/stat_test.ts index f386fd92f..69730d439 100644 --- a/cli/tests/unit/stat_test.ts +++ b/cli/tests/unit/stat_test.ts @@ -307,6 +307,10 @@ Deno.test( assert(s.rdev === null); assert(s.blksize === null); assert(s.blocks === null); + assert(s.isBlockDevice === null); + assert(s.isCharDevice === null); + assert(s.isFifo === null); + assert(s.isSocket === null); }, ); @@ -334,5 +338,9 @@ Deno.test( assert(s.rdev !== null); assert(s.blksize !== null); assert(s.blocks !== null); + assert(!s.isBlockDevice); + assert(!s.isCharDevice); + assert(!s.isFifo); + assert(!s.isSocket); }, ); -- cgit v1.2.3