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

Function uncommentExport

test/integration/page-config/test/index.test.ts:9–17  ·  view source on GitHub ↗
(page)

Source from the content-addressed store, hash-verified

7const appDir = join(__dirname, '..')
8
9async function uncommentExport(page) {
10 const pagePath = join(appDir, 'pages', page)
11 const origContent = await fs.readFile(pagePath, 'utf8')
12 const newContent = origContent.replace('// export', 'export')
13 await fs.writeFile(pagePath, newContent, 'utf8')
14 return async () => {
15 await fs.writeFile(pagePath, origContent, 'utf8')
16 }
17}
18
19describe('Page Config', () => {
20 ;(process.env.TURBOPACK_DEV ? describe.skip : describe)(

Callers 1

index.test.tsFile · 0.85

Calls 4

joinFunction · 0.90
replaceMethod · 0.65
writeFileMethod · 0.65
readFileMethod · 0.45

Tested by

no test coverage detected