function assertEquals
assertEquals<T>(): voidDeprecated
(will be removed after 1.0.0) Import from https://deno.land/std/assert/assert_equals.ts instead.
Make an assertion that actual and expected are equal, deeply. If not
deeply equal, then throw.
Type parameter can be specified to ensure values under comparison have the same type.
Examples
Example 1
Example 1
import { assertEquals } from "@std/testing/asserts"; assertEquals("world", "world"); // Doesn't throw assertEquals("hello", "world"); // Throws
Note: formatter option is experimental and may be removed in the future.
Type Parameters
TParameters
Return Type
void