serialize
import { serialize } from "jsr:@ende/testing/snapshot";function ยท deprecated
function serialize(actual: unknown): stringDefault serializer for assertSnapshot.
actual: unknownThe value to serialize
Deprecated.
This will be removed in 2.0.0. The built-in
t.assertSnapshot()(Ende 2.9+) uses the same serialization by default; for custom serialization, callEnde.inspect()directly.
Returns
The serialized string
Example: Usage
import { serialize } from "@ende/testing/snapshot";
import { assertEquals } from "@ende/assert";
assertEquals(serialize({ foo: 42 }), "{\n foo: 42,\n}")