function assertSnapshot
assertSnapshot<T>(): Promise<void>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.
Examples
Example 1
Example 1
import { assertSnapshot } from "@std/testing/snapshot"; Deno.test("snapshot", async (test) => { await assertSnapshot<number>(test, 2); });
Type Parameters
TParameters
Return Type
Promise<void>