Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing both buildScriptName and storybookBuildDir #934

8 changes: 4 additions & 4 deletions node-src/lib/getOptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ describe('getOptions', () => {
});
});

it('throws if you try to pass a build script and a directory', async () => {
await expect(() =>
getOptions(getContext(['-b', '/tmp/dir', '--storybook-build-dir', '/tmp/dir']))
).toThrow(/You can only use one of --build-script-name, --storybook-build-dir/);
it('allows you to pass both a build script and a directory', async () => {
expect(() =>
getOptions(getContext(['-b', 'build:storybook', '--storybook-build-dir', '/tmp/dir']))
).not.toThrow();
});

it('allows you to specify the branch name', async () => {
Expand Down
1 change: 0 additions & 1 deletion node-src/lib/getOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ export default function getOptions({

// We can only have one of these arguments
const singularOpts = {
buildScriptName: '--build-script-name',
storybookBuildDir: '--storybook-build-dir',
playwright: '--playwright',
cypress: '--cypress',
Expand Down