Skip to content

Commit 74f96a6

Browse files
committed
test: add missing ts-expect-error for x-runtime
1 parent ecb849a commit 74f96a6

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

tests/fixtures/middleware-conditions/middleware-shared.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export function middleware(request: NextRequest) {
55
const response: NextResponse = NextResponse.next()
66

77
// report Next.js Middleware Runtime (not the execution runtime, but target runtime)
8+
// @ts-expect-error EdgeRuntime global not declared
89
response.headers.append('x-runtime', typeof EdgeRuntime !== 'undefined' ? EdgeRuntime : 'node')
910
response.headers.set('x-hello-from-middleware-res', 'hello')
1011

tests/fixtures/middleware-src/src/middleware-shared.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export function middleware(request: NextRequest) {
66

77
response.headers.append('Deno' in globalThis ? 'x-deno' : 'x-node', Date.now().toString())
88
// report Next.js Middleware Runtime (not the execution runtime, but target runtime)
9+
// @ts-expect-error EdgeRuntime global not declared
910
response.headers.append('x-runtime', typeof EdgeRuntime !== 'undefined' ? EdgeRuntime : 'node')
1011
response.headers.set('x-hello-from-middleware-res', 'hello')
1112

tests/fixtures/middleware-trailing-slash/middleware-shared.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export function middleware(request: NextRequest) {
66

77
response.headers.append('Deno' in globalThis ? 'x-deno' : 'x-node', Date.now().toString())
88
// report Next.js Middleware Runtime (not the execution runtime, but target runtime)
9+
// @ts-expect-error EdgeRuntime global not declared
910
response.headers.append('x-runtime', typeof EdgeRuntime !== 'undefined' ? EdgeRuntime : 'node')
1011
response.headers.set('x-hello-from-middleware-res', 'hello')
1112

0 commit comments

Comments
 (0)