Skip to content

Commit 7e8609b

Browse files
committed
Fix existing tests
1 parent 1f7891d commit 7e8609b

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

test/e2e/middleware-general/test/index.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ describe('Middleware Runtime', () => {
3939
),
4040
},
4141
nextConfig: {
42+
// This test needs to intercept internal routes /_next/ (skipped by default)
43+
skipMiddlewareNextInternalRoutes: false,
4244
experimental: {
4345
webpackBuildWorker: true,
4446
},
@@ -127,7 +129,7 @@ describe('Middleware Runtime', () => {
127129
runtime: 'nodejs',
128130
matchers: [
129131
{
130-
regexp: '^.*$',
132+
regexp: '^/.*$',
131133
originalSource: '/:path*',
132134
},
133135
],

test/e2e/middleware-trailing-slash/app/next.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
module.exports = {
2+
// This test needs to intercept internal routes /_next/ (skipped by default)
3+
skipMiddlewareNextInternalRoutes: false,
24
trailingSlash: true,
35
redirects() {
46
return [

test/e2e/skip-trailing-slash-redirect/app/next.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3+
// This test needs to intercept internal routes /_next/ (skipped by default)
4+
skipMiddlewareNextInternalRoutes: false,
35
skipMiddlewareUrlNormalize: true,
46
skipTrailingSlashRedirect: true,
57
experimental: {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
// This test needs to intercept internal routes /_next/ (skipped by default)
3+
skipMiddlewareNextInternalRoutes: false,
4+
}

0 commit comments

Comments
 (0)