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

Method write

test/lib/next-test-utils.ts:804–809  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

802 }
803
804 write(content: string) {
805 if (!this.originalContent) {
806 this.originalContent = content
807 }
808 writeFileSync(this.path, content, 'utf8')
809 }
810
811 replace(pattern: RegExp | string, newValue: string) {
812 const currentContent = readFileSync(this.path, 'utf8')

Callers 15

runTestsFunction · 0.95
replaceMethod · 0.95
prependMethod · 0.95
restoreMethod · 0.95
maybeLogSummaryFunction · 0.45
handleOutputFunction · 0.45
runTestOnceFunction · 0.45
index.test.tsFile · 0.45
index.test.tsFile · 0.45
index.test.tsFile · 0.45
initFunction · 0.45
devStartAndExportFunction · 0.45

Calls 1

writeFileSyncFunction · 0.85

Tested by 8

runTestsFunction · 0.76
initFunction · 0.36
devStartAndExportFunction · 0.36
runDevFunction · 0.36
initFunction · 0.36
initFunction · 0.36
sendSmugglingPayloadFunction · 0.36