Skip to content

Commit

Permalink
fix(nextjs): add e2e test case for standalone nextjs (#16447)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndcunningham authored Apr 21, 2023
1 parent ff8074b commit 425124f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions e2e/utils/create-project-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export function runCreateWorkspace(
bundler,
routing,
standaloneApi,
nextAppDir,
}: {
preset: string;
appName?: string;
Expand All @@ -148,6 +149,7 @@ export function runCreateWorkspace(
bundler?: 'webpack' | 'vite';
standaloneApi?: boolean;
routing?: boolean;
nextAppDir?: boolean;
}
) {
projName = name;
Expand All @@ -169,6 +171,10 @@ export function runCreateWorkspace(
command += ` --bundler=${bundler}`;
}

if (nextAppDir) {
command += ` --nextAppDir=${nextAppDir}`;
}

if (standaloneApi !== undefined) {
command += ` --standaloneApi=${standaloneApi}`;
}
Expand Down
15 changes: 15 additions & 0 deletions e2e/workspace-create/src/create-nx-workspace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,21 @@ describe('create-nx-workspace', () => {
expectCodeIsFormatted();
});

it('should be able to create a nextjs standalone workspace', () => {
const wsName = uniq('next');
const appName = uniq('app');
runCreateWorkspace(wsName, {
preset: 'nextjs-standalone',
style: 'css',
nextAppDir: true,
appName,
packageManager,
});

expectNoAngularDevkit();
expectCodeIsFormatted();
});

it('should be able to create an web-components workspace', () => {
const wsName = uniq('web-components');
const appName = uniq('app');
Expand Down

1 comment on commit 425124f

@vercel
Copy link

@vercel vercel bot commented on 425124f Apr 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev

Please sign in to comment.