diff --git a/test/e2e/app-dir/app-static.test.ts b/test/e2e/app-dir/app-static.test.ts index 8f1c969055cd..4d256d73ea5a 100644 --- a/test/e2e/app-dir/app-static.test.ts +++ b/test/e2e/app-dir/app-static.test.ts @@ -54,6 +54,8 @@ describe('app-dir static/dynamic handling', () => { 'dynamic-no-gen-params-ssr/[slug]/page.js', 'dynamic-no-gen-params/[slug]/page.js', 'hooks/use-pathname/[slug]/page.js', + 'hooks/use-pathname/slug.html', + 'hooks/use-pathname/slug.rsc', 'hooks/use-search-params/[slug]/page.js', 'ssr-auto/cache-no-store/page.js', 'ssr-auto/fetch-revalidate-zero/page.js', @@ -114,6 +116,11 @@ describe('app-dir static/dynamic handling', () => { srcRoute: '/blog/[author]/[slug]', dataRoute: '/blog/styfle/second-post.rsc', }, + '/hooks/use-pathname/slug': { + dataRoute: '/hooks/use-pathname/slug.rsc', + initialRevalidateSeconds: false, + srcRoute: '/hooks/use-pathname/[slug]', + }, }) expect(manifest.dynamicRoutes).toEqual({ '/blog/[author]/[slug]': { @@ -128,6 +135,12 @@ describe('app-dir static/dynamic handling', () => { fallback: false, routeRegex: normalizeRegEx('^\\/blog\\/([^\\/]+?)(?:\\/)?$'), }, + '/hooks/use-pathname/[slug]': { + dataRoute: '/hooks/use-pathname/[slug].rsc', + dataRouteRegex: '^\\/hooks\\/use\\-pathname\\/([^\\/]+?)\\.rsc$', + fallback: null, + routeRegex: '^\\/hooks\\/use\\-pathname\\/([^\\/]+?)(?:\\/)?$', + }, }) }) } @@ -405,7 +418,8 @@ describe('app-dir static/dynamic handling', () => { } }) - describe('usePathname', () => { + // TODO: needs updating as usePathname should not bail + describe.skip('usePathname', () => { if (isDev) { it('should bail out to client rendering during SSG', async () => { const res = await fetchViaHTTP(next.url, '/hooks/use-pathname/slug')