File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,16 @@ function getJestTransformConfig(jestConfig: JestConfig26 | JestConfig27): Option
2828const defaultTsConfig = readDefaultTsConfig ( )
2929
3030export = {
31- process ( src : string , path : string , jestConfig : JestConfig26 | JestConfig27 ) : Output | string {
32- if ( / \. ( t s x ? | j s x ? | m j s ) $ / . test ( path ) ) {
31+ process ( src : string , path : string , jestConfig : JestConfig26 | JestConfig27 ) : Output {
32+ if ( / \. [ c m ] ? [ j t ] s x ? $ / . test ( path ) ) {
3333 return transformJest ( src , path , {
3434 ...tsCompilerOptionsToSwcConfig ( defaultTsConfig , path ) ,
3535 ...getJestTransformConfig ( jestConfig ) ,
3636 } )
3737 }
38- return src
38+
39+ // Since Jest 28, "process" no longer accepts a string output.
40+ return { code : src }
3941 } ,
4042 getCacheKey ( src : string , _filepath : string , config : Options ) {
4143 return xxh64 ( src + JSON . stringify ( config ) ) . toString ( 16 )
You can’t perform that action at this time.
0 commit comments