Skip to content

API Reference / @gtkx/testing / getDefaultNormalizer

Variable: getDefaultNormalizer ​

const getDefaultNormalizer: ({ trim, collapseWhitespace, }?) => NormalizerFn

Defined in: packages/testing/dist/normalize.d.ts:8

Builds the default text normalizer, which optionally trims surrounding whitespace and collapses runs of whitespace into single spaces.

Parameters ​

{ trim, collapseWhitespace, }? ​

NormalizerOptions

Returns ​

NormalizerFn

A function that normalizes a string for comparison against a matcher.