Renders the differences between the actual and expected values.
The type of elements in the arrays.
Actual value
Expected value
An array of differences between the actual and expected values.
import { diff } from "@std/internal/diff";import { assertEquals } from "@std/assert";const a = [1, 2, 3];const b = [1, 2, 4];assertEquals(diff(a, b), [ { type: "common", value: 1 }, { type: "common", value: 2 }, { type: "removed", value: 3 }, { type: "added", value: 4 },]); Copy
import { diff } from "@std/internal/diff";import { assertEquals } from "@std/assert";const a = [1, 2, 3];const b = [1, 2, 4];assertEquals(diff(a, b), [ { type: "common", value: 1 }, { type: "common", value: 2 }, { type: "removed", value: 3 }, { type: "added", value: 4 },]);
Renders the differences between the actual and expected values.