Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/actionify/tests/deps.ts>assertSnapshot

Create and manage your GitHub workflows with TypeScript and Deno.
Latest
function assertSnapshot
import { assertSnapshot } from "https://deno.land/x/actionify@0.3.0/tests/deps.ts";

Make an assertion that actual matches a snapshot. If the snapshot and actual do not a match, then throw.

Type parameter can be specified to ensure values under comparison have the same type. For example:

import { assertSnapshot } from "./snapshot.ts";

Deno.test("snapshot", async (test) => {
 await assertSnapshot<number>(test, 2);
});

Returns

Promise<void>

Parameters

actual: T
optional
message: string

Returns

Promise<void>