Skip to content

Commit 28309de

Browse files
committed
chore: wip
1 parent 6971f96 commit 28309de

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/helpers/files.spec.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,19 +188,20 @@ describe('files utility functions', () => {
188188
})
189189
})
190190

191-
test('patches Next server files', async () => {
191+
test.only('patches Next server files', async () => {
192192
const root = path.resolve(dirname(__dirname))
193-
await copy(join(root, 'package.json'), path.join(process.cwd(), 'package.json'))
194-
await ensureDir(path.join(process.cwd(), 'node_modules'))
195-
await copy(path.join(root, 'node_modules', 'next'), path.join(process.cwd(), 'node_modules', 'next'))
193+
console.log({ root })
194+
// await copy(join(root, 'package.json'), path.join(process.cwd(), 'package.json'))
195+
// await ensureDir(path.join(process.cwd(), 'node_modules'))
196+
// await copy(path.join(root, 'node_modules', 'next'), path.join(process.cwd(), 'node_modules', 'next'))
196197

197-
await patchNextFiles(process.cwd())
198+
// await patchNextFiles(process.cwd())
198199
const serverFile = path.resolve(process.cwd(), 'node_modules', 'next', 'dist', 'server', 'base-server.js')
199200
const patchedData = await readFileSync(serverFile, 'utf8')
200201
expect(patchedData.includes('_REVALIDATE_SSG')).toBeTruthy()
201202
expect(patchedData.includes('private: isPreviewMode && cachedData')).toBeTruthy()
202203

203-
await unpatchNextFiles(process.cwd())
204+
// await unpatchNextFiles(process.cwd())
204205

205206
const unPatchedData = await readFileSync(serverFile, 'utf8')
206207
expect(unPatchedData.includes('_REVALIDATE_SSG')).toBeFalsy()

0 commit comments

Comments
 (0)