import { mockFile } from "https://deno.land/x/deno_slack_hooks@0.2.0/dev_deps.ts";
const { prepareVirtualFile } = mockFile;
Preloads virtual file that will be opened/read later.
Parameters
path: string | URL
Path to file.
optional
fileInfo: Partial<Deno.FileInfo> = [UNSUPPORTED]The object used as the return value of file.stat.
import { prepareVirtualFile } from "https://deno.land/x/mock_file@$VERSION/mod.ts";
const content = new TextEncoder().encode("hello world");
prepareVirtualFile("./no/such/file.txt", content);
const file = Deno.openSync("./no/such/file.txt");