MCPcopy
hub / github.com/vercel/next.js / normalizeTestDirContent

Method normalizeTestDirContent

test/lib/next-modes/base.ts:509–515  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

507 // normalize snapshots or stack traces being tested
508 // to a consistent test dir value since it's random
509 public normalizeTestDirContent(content) {
510 content = content.replace(
511 new RegExp(escapeStringRegexp(this.testDir), 'g'),
512 'TEST_DIR'
513 )
514 return content
515 }
516
517 public async clean() {
518 if (this.childProcess) {

Calls 2

replaceMethod · 0.65
escapeStringRegexpFunction · 0.50

Tested by

no test coverage detected