Skip to main content
Module

std/testing/asserts.ts>equal

The Deno Standard Library
Latest
function equal
Deprecated
Deprecated

(will be removed after 1.0.0) Import from https://deno.land/std/assert/equal.ts instead.

import { equal } from "https://deno.land/std@0.222.1/testing/asserts.ts";

Deep equality comparison used in assertions

Examples

Example 1

import { equal } from "https://deno.land/std@0.222.1/testing/asserts.ts";

equal({ foo: "bar" }, { foo: "bar" }); // Returns `true`
equal({ foo: "bar" }, { foo: "baz" }); // Returns `false

Parameters

c: unknown

actual value

d: unknown

expected value

Returns

boolean