Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nextjs): return correct webpack config for next.js storybook app
- Loading branch information
Showing
3 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { | ||
cleanupProject, | ||
newProject, | ||
runCLI, | ||
runCommandUntil, | ||
uniq, | ||
} from '@nrwl/e2e/utils'; | ||
|
||
describe('Next.js Applications', () => { | ||
let proj: string; | ||
|
||
beforeEach(() => (proj = newProject())); | ||
|
||
afterEach(() => cleanupProject()); | ||
|
||
it('should run a Next.js based Storybook setup', async () => { | ||
const appName = uniq('app'); | ||
runCLI(`generate @nrwl/next:app ${appName} --no-interactive`); | ||
runCLI( | ||
`generate @nrwl/next:component Foo --project=${appName} --no-interactive` | ||
); | ||
runCLI( | ||
`generate @nrwl/react:storybook-configuration ${appName} --generateStories --no-interactive` | ||
); | ||
|
||
const p = await runCommandUntil(`run ${appName}:storybook`, (output) => { | ||
return /Storybook.*started/gi.test(output); | ||
}); | ||
|
||
p.kill(); | ||
}, 1_000_000); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters