MCPcopy Create free account
hub / github.com/vitest-dev/vitest / getDefaultOptions

Function getDefaultOptions

packages/utils/src/diff/normalizeDiffOptions.ts:17–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15const DIFF_TRUNCATE_THRESHOLD_DEFAULT = 0 // not truncate
16
17function getDefaultOptions(): DiffOptionsNormalized {
18 return {
19 aAnnotation: 'Expected',
20 aColor: c.green,
21 aIndicator: '-',
22 bAnnotation: 'Received',
23 bColor: c.red,
24 bIndicator: '+',
25 changeColor: c.inverse,
26 changeLineTrailingSpaceColor: noColor,
27 commonColor: c.dim,
28 commonIndicator: ' ',
29 commonLineTrailingSpaceColor: noColor,
30 compareKeys: undefined,
31 contextLines: DIFF_CONTEXT_DEFAULT,
32 emptyFirstOrLastLinePlaceholder: '',
33 expand: false,
34 includeChangeCounts: false,
35 omitAnnotationLines: false,
36 patchColor: c.yellow,
37 printBasicPrototype: false,
38 truncateThreshold: DIFF_TRUNCATE_THRESHOLD_DEFAULT,
39 truncateAnnotation: '... Diff result is truncated',
40 truncateAnnotationColor: noColor,
41 }
42}
43
44function getCompareKeys(compareKeys?: CompareKeys): CompareKeys {
45 return compareKeys && typeof compareKeys === 'function'

Callers 1

normalizeDiffOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected