Skip to content

Commit

Permalink
fix(core): nxComponentTestingPreset should not expose bundler option (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ndcunningham committed Apr 26, 2024
1 parent ac9ad35 commit 49af691
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/angular/plugins/component-testing.ts
@@ -1,6 +1,6 @@
import {
nxBaseCypressPreset,
NxComponentTestingOptions,
NxComponentTestingPresetOptions,
} from '@nx/cypress/plugins/cypress-preset';
import {
createExecutorContext,
Expand Down Expand Up @@ -45,7 +45,7 @@ import { gte } from 'semver';
*/
export function nxComponentTestingPreset(
pathToConfig: string,
options?: NxComponentTestingOptions
options?: NxComponentTestingPresetOptions
) {
if (global.NX_GRAPH_CREATION) {
// this is only used by plugins, so we don't need the component testing
Expand Down
5 changes: 5 additions & 0 deletions packages/cypress/plugins/cypress-preset.ts
Expand Up @@ -34,6 +34,11 @@ export interface NxComponentTestingOptions {
compiler?: 'swc' | 'babel';
}

// The bundler is only used while generating the component testing configuration
// It cannot be changed after the configuration is generated
export interface NxComponentTestingPresetOptions
extends Omit<NxComponentTestingOptions, 'bundler'> {}

export function nxBaseCypressPreset(
pathToConfig: string,
options?: { testingType: 'component' | 'e2e' }
Expand Down

0 comments on commit 49af691

Please sign in to comment.