import { snapshotTest } from "https://deno.land/x/cliffy@v1.0.0-rc.1/testing/snapshot.ts";
Run prompt snapshot tests.
import { snapshotTest } from "./snapshot.ts";
import { Input } from "../prompt/input.ts";
await snapshotTest({
name: "test name",
meta: import.meta,
osSuffix: ["windows"],
steps: {
"should enter some text": { stdin: ["foo bar", "\n"] },
},
async fn() {
await Input.prompt({
message: "Whats your name?",
default: "foo",
});
},
});
Parameters
options: SnapshotTestOptions
Test options