Skip to content

Commit

Permalink
misc: remove NEXT_RUNTIME=edge from middleware tests (vercel#40977)
Browse files Browse the repository at this point in the history
This seems to be the cause for the failure of  https://github.com/vercel/next.js/actions/runs/3133433920/jobs/5087331787 that caused[ the revert](vercel#40967) of my [commit ](vercel@11deaaa) that changed the edge bundle to SSR.

After investigating, I realised this was the culprit: this forces the test app code to run with this on, somehow, when built on Vercel.

Removing it should fix it. Let's merge if all tests still pass?

Open questions:
- I'm not sure why this is/was needed, since this variable should always be inlined by webpack
- furthermore, this was causing client code to run as-if on the edge?
- but also, this still shouldn't happen because webpack should get rid of it




## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
  • Loading branch information
feedthejim committed Sep 28, 2022
1 parent 070239e commit f7ce8ec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion test/e2e/middleware-general/test/index.test.ts
Expand Up @@ -56,7 +56,6 @@ describe('Middleware Runtime', () => {
ANOTHER_MIDDLEWARE_TEST: 'asdf2',
STRING_ENV_VAR: 'asdf3',
MIDDLEWARE_TEST: 'asdf',
NEXT_RUNTIME: 'edge',
},
})
})
Expand Down
1 change: 0 additions & 1 deletion test/integration/middleware-prefetch/tests/index.test.js
Expand Up @@ -38,7 +38,6 @@ describe('Middleware Production Prefetch', () => {
context.app = await nextStart(context.appDir, context.appPort, {
env: {
MIDDLEWARE_TEST: 'asdf',
NEXT_RUNTIME: 'edge',
},
onStdout(msg) {
context.logs.output += msg
Expand Down

0 comments on commit f7ce8ec

Please sign in to comment.