(actual: unknown)
| 28 | * serialization, call `Deno.inspect()` directly. |
| 29 | */ |
| 30 | export 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. |
no outgoing calls
no test coverage detected