import { createMock } from 'ts-auto-mock' ; import { method , On } from 'ts-auto-mock/extension' ; describe ( 'property literal test' , ( ) => { it ( 'should give the correct name to the spy' , ( ) => { interface WithStringLiteralProperties { '&methodSpecialCharacters' : ( ) => number ; } const mock = createMock < WithStringLiteralProperties > ( ) ; const spyA = On ( mock ) . get ( method ( '&methodSpecialCharacters' ) ) ; expect ( spyA . and . identity ) . toBe ( '&methodSpecialCharacters' ) ; } ) ; } ) ;