MCPcopy
hub / github.com/vitest-dev/vitest / normalize

Function normalize

packages/browser/src/client/tester/expect/utils.ts:278–280  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

276}
277
278export function normalize(text: string): string {
279 return text.replace(/\s+/g, ' ').trim()
280}
281
282export function matches(textToMatch: string, matcher: string | RegExp): boolean {
283 if (matcher instanceof RegExp) {

Callers 15

toHaveTextContentFunction · 0.90
getSourcesMethod · 0.85
takeCoverageFunction · 0.85
takeScreenshotFunction · 0.85
rollup.config.jsFile · 0.85
getModuleInformationMethod · 0.85
getImportDurationsMethod · 0.85
cachedResolver.tsFile · 0.85
_setServerMethod · 0.85
transformFunction · 0.85
handlerFunction · 0.85

Calls

no outgoing calls

Tested by 2

normalizeCwdFunction · 0.68
normalizeFilenameFunction · 0.68