You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO(root-params): add support for route handlers
128
-
it('should error when used in a route handler (until we implement it)',async()=>{
127
+
it('should allow reading params in a route handler',async()=>{
129
128
constparams={lang: 'en',locale: 'us'}
130
129
constresponse=awaitnext.fetch(
131
130
`/${params.lang}/${params.locale}/route-handler`
132
131
)
133
-
expect(response.status).toBe(500)
134
-
if(!isNextDeploy){
135
-
expect(next.cliOutput).toInclude(
136
-
"Route /[lang]/[locale]/route-handler used `import('next/root-params').lang()` inside a Route Handler. Support for this API in Route Handlers is planned for a future version of Next.js."
0 commit comments