Skip to content

API Reference / @gtkx/testing / prettyFormat / PrettyFormatOptions

Interface: PrettyFormatOptions ​

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:48

Properties ​

callToJSON? ​

optional callToJSON?: boolean

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:54

Call toJSON on objects before formatting them. Ignored after the formatter has already called toJSON once for a value.

Default ​

ts
true

compareKeys? ​

optional compareKeys?: CompareKeys

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:116

Compare function used when sorting object keys. Set to null to disable sorting.


escapeRegex? ​

optional escapeRegex?: boolean

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:59

Whether to escape special characters in regular expressions.

Default ​

ts
false

escapeString? ​

optional escapeString?: boolean

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:64

Whether to escape special characters in strings.

Default ​

ts
true

highlight? ​

optional highlight?: boolean

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:69

Whether to highlight syntax using terminal colors.

Default ​

ts
false

indent? ​

optional indent?: number

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:74

Number of spaces to use for each level of indentation.

Default ​

ts
2

maxDepth? ​

optional maxDepth?: number

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:79

Maximum depth to recurse into nested values.

Default ​

ts
Infinity

maxOutputLength? ​

optional maxOutputLength?: number

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:92

Approximate per-depth-level budget for output length. When the accumulated output at any single depth level exceeds this value, further nesting is collapsed. This is a heuristic safety valve, not a hard limit — total output can reach up to roughly maxDepth × maxOutputLength.

Default ​

ts
1_000_000

maxWidth? ​

optional maxWidth?: number

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:84

Maximum number of items to print in arrays, sets, maps, and similar collections.

Default ​

ts
Infinity

min? ​

optional min?: boolean

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:97

Whether to minimize added whitespace, including indentation and line breaks.

Default ​

ts
false

plugins? ​

optional plugins?: Plugins

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:121

Plugins used to serialize application-specific data types.

Default ​

ts
[]

printBasicPrototype? ​

optional printBasicPrototype?: boolean

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:102

Whether to print Object / Array prefixes for plain objects and arrays.

Default ​

ts
true

printFunctionName? ​

optional printFunctionName?: boolean

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:107

Whether to include the function name when formatting functions.

Default ​

ts
true

printShadowRoot? ​

optional printShadowRoot?: boolean

Defined in: node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.d.ts:112

Whether to include shadow-root contents when formatting DOM nodes.

Default ​

ts
true

Released under the MPL-2.0 License.