import { createMock } from 'ts-auto-mock' ; describe ( 'properties inferred type' , ( ) => { function funcReturningNumber ( ) { return 3 ; } function funcReturningNumberNoTypeDef ( ) { return 3 ; } class Test { public test = 2 ; public testFunctionCall = funcReturningNumber ( ) ; public testFunctionCallNoTypeDef = funcReturningNumberNoTypeDef ( ) ; } it ( 'should infer the correct type for numbers' , ( ) => { const mock = createMock < Test > ( ) ; expect ( mock . test ) . toBe ( 2 ) ; } ) ; it ( 'should infer the correct type for function calls of functions with type def' , ( ) => { const mock = createMock < Test > ( ) ; expect ( mock . testFunctionCall ) . toBe ( 0 ) ; } ) ; it ( 'should infer the correct type for function calls of functions with no type def' , ( ) => { const mock = createMock < Test > ( ) ; expect ( mock . testFunctionCallNoTypeDef ) . toBe ( 3 ) ; } ) ; } ) ;