From eb85a07baeb9d95aff68033a1490ccbe10d7ac5e Mon Sep 17 00:00:00 2001 From: Nicholas Cunningham Date: Thu, 29 Feb 2024 10:16:17 -0700 Subject: [PATCH] fix(nextjs): Add spec files when creating a next app --- e2e/next-core/src/next-appdir.test.ts | 2 +- .../__snapshots__/application.spec.ts.snap | 2 +- .../generators/application/application.spec.ts | 3 ++- .../application/files/app/page.tsx__tmpl__ | 2 +- .../common/specs/__fileName__.spec.tsx__tmpl__ | 13 +++++++++---- .../application/lib/create-application-files.ts | 17 +++++++++-------- 6 files changed, 23 insertions(+), 16 deletions(-) diff --git a/e2e/next-core/src/next-appdir.test.ts b/e2e/next-core/src/next-appdir.test.ts index 5a0dcc7e9319c..36a099b4f56e5 100644 --- a/e2e/next-core/src/next-appdir.test.ts +++ b/e2e/next-core/src/next-appdir.test.ts @@ -35,7 +35,7 @@ describe('Next.js App Router', () => { import React from 'react'; import { ${jsLib} } from '@${proj}/${jsLib}'; - export default async function Page() { + export default function Page() { return (

{${jsLib}()}

); diff --git a/packages/next/src/generators/application/__snapshots__/application.spec.ts.snap b/packages/next/src/generators/application/__snapshots__/application.spec.ts.snap index c22ce712304dd..e43fb090a98f7 100644 --- a/packages/next/src/generators/application/__snapshots__/application.spec.ts.snap +++ b/packages/next/src/generators/application/__snapshots__/application.spec.ts.snap @@ -3,7 +3,7 @@ exports[`app --style styled-jsx should use