Skip to content

Commit 4c04c92

Browse files
committed
test: use Deno.stat instead of Deno.open so directories can work in windows
1 parent 69e9cef commit 4c04c92

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/helpers/io.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ export const calculateFileSize = async (
2626
export const isFile = async (
2727
filePath: string,
2828
): Promise<boolean> => {
29-
const file = await Deno.open(filePath, { read: true });
30-
const fileInfo = await Deno.fstat(file.rid);
31-
Deno.close(file.rid);
29+
const fileInfo = await Deno.stat(filePath);
3230
return fileInfo.isFile;
3331
};

0 commit comments

Comments
 (0)