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
28
28
const defaultTsConfig = readDefaultTsConfig ( )
29
29
30
30
export = {
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 ) ) {
33
33
return transformJest ( src , path , {
34
34
...tsCompilerOptionsToSwcConfig ( defaultTsConfig , path ) ,
35
35
...getJestTransformConfig ( jestConfig ) ,
36
36
} )
37
37
}
38
- return src
38
+
39
+ // Since Jest 28, "process" no longer accepts a string output.
40
+ return { code : src }
39
41
} ,
40
42
getCacheKey ( src : string , _filepath : string , config : Options ) {
41
43
return xxh64 ( src + JSON . stringify ( config ) ) . toString ( 16 )
You can’t perform that action at this time.
0 commit comments