fix(core): nxComponentTestingPreset should not expose bundler option (#23009)
This commit is contained in:
parent
ac9ad35754
commit
49af691b24
@ -1,6 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
nxBaseCypressPreset,
|
nxBaseCypressPreset,
|
||||||
NxComponentTestingOptions,
|
NxComponentTestingPresetOptions,
|
||||||
} from '@nx/cypress/plugins/cypress-preset';
|
} from '@nx/cypress/plugins/cypress-preset';
|
||||||
import {
|
import {
|
||||||
createExecutorContext,
|
createExecutorContext,
|
||||||
@ -45,7 +45,7 @@ import { gte } from 'semver';
|
|||||||
*/
|
*/
|
||||||
export function nxComponentTestingPreset(
|
export function nxComponentTestingPreset(
|
||||||
pathToConfig: string,
|
pathToConfig: string,
|
||||||
options?: NxComponentTestingOptions
|
options?: NxComponentTestingPresetOptions
|
||||||
) {
|
) {
|
||||||
if (global.NX_GRAPH_CREATION) {
|
if (global.NX_GRAPH_CREATION) {
|
||||||
// this is only used by plugins, so we don't need the component testing
|
// this is only used by plugins, so we don't need the component testing
|
||||||
|
|||||||
@ -34,6 +34,11 @@ export interface NxComponentTestingOptions {
|
|||||||
compiler?: 'swc' | 'babel';
|
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(
|
export function nxBaseCypressPreset(
|
||||||
pathToConfig: string,
|
pathToConfig: string,
|
||||||
options?: { testingType: 'component' | 'e2e' }
|
options?: { testingType: 'component' | 'e2e' }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user