Skip to content

API Reference / @gtkx/testing / getDefaultNormalizer

Function: getDefaultNormalizer() ​

getDefaultNormalizer(options?): NormalizerFn

Defined in: packages/testing/src/normalize.ts:9

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

Parameters ​

options? ​

NormalizerOptions = {}

Toggles for trimming and whitespace collapsing.

Returns ​

NormalizerFn

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