MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / normalizeTestName

Function normalizeTestName

scripts/report-ci-failures.mjs:44–49  ·  view source on GitHub ↗

* Collapse esm/cjs variants of a test name so the same test failing in both module formats dedupes * to a single issue instead of one per variant: * * "... > esm/cjs > esm > should send messages" -> "... > esm/cjs > should send messages" * "... > esm/cjs > cjs > should send messages" -> "...

(name)

Source from the content-addressed store, hash-verified

42 * "... > esm/cjs > cjs > should send messages" -> "... > esm/cjs > should send messages"
43 */
44function normalizeTestName(name) {
45 return name
46 .replace(/esm\/cjs\s*>\s*(?:esm|cjs)\b/gi, 'esm/cjs')
47 .replace(/\s+/g, ' ')
48 .trim();
49}
50
51function applyVars(text, vars) {
52 let result = text;

Callers 1

runFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected