jest regex jsx code example
Example: jest regex jsx tsx js ts
//jest.config.js
{
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$"
}
// matches (spec or test) with .js .jsx .ts .tsx
//jest.config.js
{
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$"
}
// matches (spec or test) with .js .jsx .ts .tsx