fix(react): component test regex should not use global (#17548)
This commit is contained in:
parent
73ab23f381
commit
76b7d61592
@ -11,8 +11,8 @@ import { getComponentNode } from './ast-utils';
|
|||||||
|
|
||||||
let tsModule: typeof import('typescript');
|
let tsModule: typeof import('typescript');
|
||||||
|
|
||||||
const allowedFileExt = new RegExp(/\.[jt]sx?/g);
|
const allowedFileExt = new RegExp(/\.[jt]sx?/);
|
||||||
const isSpecFile = new RegExp(/(spec|test)\./g);
|
const isSpecFile = new RegExp(/(spec|test)\./);
|
||||||
|
|
||||||
export interface FoundTarget {
|
export interface FoundTarget {
|
||||||
config?: TargetConfiguration;
|
config?: TargetConfiguration;
|
||||||
@ -56,6 +56,7 @@ function assertValidConfig(config: unknown) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getBundlerFromTarget(
|
export async function getBundlerFromTarget(
|
||||||
found: FoundTarget,
|
found: FoundTarget,
|
||||||
tree: Tree
|
tree: Tree
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user