import { createMock } from 'ts-auto-mock' ; import { method , On } from 'ts-auto-mock/extension' ; describe ( 'primitives' , ( ) => { type A = string ; let mock ; beforeEach ( ( ) => { mock = createMock < A > ( ) ; } ) ; it ( 'should not be able to get the mock' , ( ) => { expect ( ( ) => { On ( mock ) . get ( method ( ( x ) => x . apply ) ) ; } ) . toThrow ( ) ; } ) ; } ) ;