@@ -9,13 +9,18 @@ jest.mock('@babel/core', () => {
99import { getPostProcessHook } from '../../src/postprocess' ;
1010
1111describe ( 'postprocess' , ( ) => {
12- function runHook ( tsCompilerOptions = { } , jestConfig = { } , tsJestConfig = { } ) {
13- return getPostProcessHook ( tsCompilerOptions , jestConfig , tsJestConfig ) (
14- { code : 'input_code' , map : 'input_source_map' } ,
15- 'fake_file' ,
16- { } ,
17- { instrument : null } ,
18- ) ;
12+ function runHook (
13+ tsCompilerOptions = { } ,
14+ jestConfig : Partial < jest . ProjectConfig > = { } ,
15+ tsJestConfig = { } ,
16+ ) {
17+ return getPostProcessHook (
18+ tsCompilerOptions ,
19+ jestConfig as any ,
20+ tsJestConfig ,
21+ ) ( { code : 'input_code' , map : 'input_source_map' } , 'fake_file' , { } as any , {
22+ instrument : null ,
23+ } ) ;
1924 }
2025
2126 it ( 'skips postprocess when skipBabel=true' , ( ) => {
@@ -29,10 +34,10 @@ describe('postprocess', () => {
2934 const transformMock = require . requireMock ( '@babel/core' ) . transform ;
3035
3136 runHook ( ) ;
32- getPostProcessHook ( { } , { } , { } ) (
37+ getPostProcessHook ( { } , { } as any , { } ) (
3338 { code : 'input_code' , map : 'input_source_map' } ,
3439 'fake_file' ,
35- { } ,
40+ { } as any ,
3641 { instrument : null } ,
3742 ) ;
3843 expect ( transformMock ) . lastCalledWith (
0 commit comments