MCPcopy Create free account
hub / github.com/denoland/std / serialize

Function serialize

testing/_snapshot_utils.ts:30–41  ·  view source on GitHub ↗
(actual: unknown)

Source from the content-addressed store, hash-verified

28 * serialization, call `Deno.inspect()` directly.
29 */
30export function serialize(actual: unknown): string {
31 return Deno.inspect(actual, {
32 depth: Infinity,
33 sorted: true,
34 trailingComma: true,
35 compact: false,
36 iterableLimit: Infinity,
37 strAbbreviateSize: Infinity,
38 breakLength: Infinity,
39 escapeSequences: false,
40 }).replaceAll("\r", "\\r");
41}
42
43/**
44 * Converts a string to a valid JavaScript string which can be wrapped in backticks.

Callers 2

testFailedAssertionFunction · 0.90
snapshot_test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected