Skip to content

Commit 694a2be

Browse files
authored
test: allow running Vercel e2e with runtime in directory different than default (#290)
1 parent f78074b commit 694a2be

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

run-local-test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ fi
1212
export NEXT_TEST_CONTINUE_ON_ERROR=1
1313
export NETLIFY_SITE_ID=1d5a5c76-d445-4ae5-b694-b0d3f2e2c395
1414
export NEXT_TEST_MODE=deploy
15+
export RUNTIME_DIR=$(pwd)
1516
cp tests/netlify-deploy.ts ../next.js/test/lib/next-modes/netlify-deploy.ts
1617
cd ../next.js/
1718
git apply ../next-runtime-minimal/tests/e2e-utils.patch

tests/netlify-deploy.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ export class NextDeployInstance extends NextInstance {
4343
publish = ".next"
4444
4545
[[plugins]]
46-
package = "${path.relative(this.testDir, `${process.cwd()}/../next-runtime-minimal`)}"
46+
package = "${path.relative(
47+
this.testDir,
48+
process.env.RUNTIME_DIR || `${process.cwd()}/../next-runtime-minimal`,
49+
)}"
4750
`
4851

4952
await fs.writeFile(path.join(this.testDir, 'netlify.toml'), toml)

0 commit comments

Comments
 (0)