@@ -261,26 +261,29 @@ describe("aborts middleware execution when the matcher conditions don't match th
261261
262262 ctx . cleanup ?. push ( ( ) => origin . stop ( ) )
263263
264- for ( const path of [ '/hello' , '/en/hello' , '/nl-NL /hello' , '/nl-NL /about' ] ) {
264+ for ( const path of [ '/hello' , '/en/hello' , '/nl/hello' , '/nl/about' ] ) {
265265 const response = await invokeEdgeFunction ( ctx , {
266266 functions : [ '___netlify-edge-handler-middleware' ] ,
267267 origin,
268268 url : path ,
269269 } )
270- expect ( response . headers . has ( 'x-hello-from-middleware-res' ) , `does match ${ path } ` ) . toBeTruthy ( )
270+ expect (
271+ response . headers . has ( 'x-hello-from-middleware-res' ) ,
272+ `should match ${ path } ` ,
273+ ) . toBeTruthy ( )
271274 expect ( await response . text ( ) ) . toBe ( 'Hello from origin!' )
272275 expect ( response . status ) . toBe ( 200 )
273276 }
274277
275- for ( const path of [ '/hello/invalid' , '/about' , '/en/about' ] ) {
278+ for ( const path of [ '/invalid/hello' , '/ hello/invalid', '/about' , '/en/about' ] ) {
276279 const response = await invokeEdgeFunction ( ctx , {
277280 functions : [ '___netlify-edge-handler-middleware' ] ,
278281 origin,
279282 url : path ,
280283 } )
281284 expect (
282285 response . headers . has ( 'x-hello-from-middleware-res' ) ,
283- `does not match ${ path } ` ,
286+ `should not match ${ path } ` ,
284287 ) . toBeFalsy ( )
285288 expect ( await response . text ( ) ) . toBe ( 'Hello from origin!' )
286289 expect ( response . status ) . toBe ( 200 )
0 commit comments