Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use AssertionError
  • Loading branch information
c4spar committed Apr 3, 2023
commit daf3a96fcb43239e7966ad6026e41e23ef14727e
5 changes: 3 additions & 2 deletions prompt/testing.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AssertionError } from "https://deno.land/std@0.170.0/testing/asserts.ts";
import { assertSnapshot } from "https://deno.land/std@0.170.0/testing/snapshot.ts";
import { eraseDown } from "../ansi/ansi_escapes.ts";
import { basename } from "./deps.ts";
import { assertSnapshot } from "https://deno.land/std@0.170.0/testing/snapshot.ts";

export interface AssertPromptSnapshotOptions {
meta: ImportMeta;
Expand Down Expand Up @@ -130,7 +131,7 @@ async function runPrompt(
await child.stdin.close();

if (!success) {
throw new Error(`test failed: ${url}`);
throw new AssertionError(`test failed: ${url}`);
}

// Add a line break after each test input.
Expand Down