Skip to content

Commit

Permalink
Merge pull request #25828 from storybookjs/norbert/fix-testflag-addon…
Browse files Browse the repository at this point in the history
…-filtering

Core: Fix `--test` must be passed for `build.test` values to be set.
  • Loading branch information
valentinpalkovic authored Jan 31, 2024
2 parents 69fcccd + b7127d5 commit d9e1720
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions code/frameworks/angular/src/builders/build-storybook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export type StorybookBuilderOptions = JsonObject & {
| 'configDir'
| 'loglevel'
| 'quiet'
| 'test'
| 'webpackStatsJson'
| 'disableTelemetry'
| 'debugWebpack'
Expand Down Expand Up @@ -87,6 +88,7 @@ const commandBuilder: BuilderHandlerFn<StorybookBuilderOptions> = (
configDir,
docs,
loglevel,
test,
outputDir,
quiet,
enableProdMode = true,
Expand All @@ -104,6 +106,7 @@ const commandBuilder: BuilderHandlerFn<StorybookBuilderOptions> = (
...(docs ? { docs } : {}),
loglevel,
outputDir,
test,
quiet,
enableProdMode,
disableTelemetry,
Expand Down
10 changes: 6 additions & 4 deletions code/lib/core-server/src/presets/common-override-preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ const createTestBuildFeatures = (value: boolean): Required<TestBuildFlags> => ({
export const build: PresetProperty<'build'> = async (value, options) => {
return {
...value,
test: {
...createTestBuildFeatures(!!options.test),
...value?.test,
},
test: options.test
? {
...createTestBuildFeatures(!!options.test),
...value?.test,
}
: createTestBuildFeatures(false),
};
};

0 comments on commit d9e1720

Please sign in to comment.