File tree 2 files changed +3
-6
lines changed
cypress/integration/middleware
2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,9 @@ describe('Enhanced middleware', () => {
12
12
} )
13
13
14
14
it ( 'rewrites the response body' , ( ) => {
15
- cy . on ( 'uncaught:exception' , ( err , runnable ) => {
16
- console . log ( err . message )
17
- } )
18
15
cy . visit ( '/static' )
19
- cy . findByText ( 'This was static but has been transformed in' )
20
- cy . findByText ( "This is an ad that isn't shown by default" )
16
+ cy . get ( '#message' ) . contains ( 'This was static but has been transformed in' )
17
+ cy . contains ( "This is an ad that isn't shown by default" )
21
18
} )
22
19
23
20
it ( 'modifies the page props' , ( ) => {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import type { ElementHandlers } from './html-rewriter'
5
5
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6
6
export type NextDataTransform = < T extends { pageProps ?: Record < string , any > } > ( props : T ) => T
7
7
8
- // A NextReponse that wraps the Netlify origin response
8
+ // A NextResponse that wraps the Netlify origin response
9
9
// We can't pass it through directly, because Next disallows returning a response body
10
10
export class MiddlewareResponse extends NextResponse {
11
11
private readonly dataTransforms : NextDataTransform [ ]
You can’t perform that action at this time.
0 commit comments