Closed JeanBeaurepaire closed 9 months ago
Hey, I've just played a bit to add support for typescript 5.2 and greater. 99% of the stuff works except since version 5.1.X there is something nasty happening :(
if you mock using typeof, the compiled code is struggling to get reference imports correctly.
import {createMock} from 'ts-auto-mock';
import {Hello} from "./hello";
it('should work', () => {
console.log(Hello);
const type: any = createMock<typeof Hello>();
expect(type.a).toBe("s");
});
console log shows undefined :(
This is only happening when using createMock, it's definitely something weird that we are doing!
I'll see if I get around it during the holidays! Merry Christmas
It should now be fixed! Try the latest version!
I'll close this issue! Feel free to open another issue if the problem persists!
Subject of the issue
When I'm using ts-auto-mock with Typescript 5.2.2, I have this issue:
Your environment
Steps to reproduce
Use ts-auto-mock with Typescript > 5.2.2
Expected behavior
No compile errors.
Actual behavior
Above error