MCPcopy
hub / github.com/codeceptjs/CodeceptJS / generateStepPrefix

Function generateStepPrefix

lib/plugin/aiTrace.js:447–456  ·  view source on GitHub ↗
(step, index)

Source from the content-addressed store, hash-verified

445 }
446
447 function generateStepPrefix(step, index) {
448 const stepName = step.toString()
449 const cleanedName = clearString(stepName)
450 .replace(/[^a-zA-Z0-9_-]/g, '_')
451 .replace(/_{2,}/g, '_')
452 .slice(0, 80)
453 .trim()
454
455 return `${String(index).padStart(4, '0')}_${cleanedName}`
456 }
457}

Callers 2

aiTrace.jsFile · 0.85
persistStepFunction · 0.85

Calls 2

clearStringFunction · 0.90
toStringMethod · 0.45

Tested by

no test coverage detected