Skip to content

Commit

Permalink
Fix e2e rsc test for deploy mode (#38538)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Jul 12, 2022
1 parent 114e151 commit 3ae15e1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/e2e/app-dir/rsc-basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('app dir - react server components', () => {
const appDir = path.join(__dirname, './rsc-basic')
next = await createNext({
files: {
node_modules: new FileRef(path.join(appDir, 'node_modules')),
node_modules_bak: new FileRef(path.join(appDir, 'node_modules_bak')),
pages: new FileRef(path.join(appDir, 'pages')),
public: new FileRef(path.join(appDir, 'public')),
components: new FileRef(path.join(appDir, 'components')),
Expand All @@ -44,6 +44,16 @@ describe('app dir - react server components', () => {
react: 'experimental',
'react-dom': 'experimental',
},
packageJson: {
scripts: {
setup: `cp -r ./node_modules_bak/non-isomorphic-text ./node_modules; cp -r ./node_modules_bak/random-module-instance ./node_modules`,
build: 'yarn setup && next build',
dev: 'yarn setup && next dev',
start: 'next start',
},
},
startCommand: (global as any).isNextDev ? 'yarn dev' : 'yarn start',
buildCommand: 'yarn build',
})
distDir = path.join(next.testDir, '.next')
})
Expand Down

0 comments on commit 3ae15e1

Please sign in to comment.