Yashua

Results 64 comments of Yashua

@vazh unfortunately that one is a jQuery and not a native Angular one.

I agree that this is prob issue but how can we mock a single function then? Ive tried a dynamic import inside the 'jest.unstable_mockModule` call such as ```` jest.unstable_mockModule(`./main.js`, async...

@VladimirGrenaderov can't - `jest.unstable_mockModule` is hoisted so I don't have access to anything outside of it.

But feel free to close - I moved to `vitest` so would not be able to even test a solution.

Got it. I just tried the await import at top on sample repo and that didn't work either.

I think you are right that this is an ESM issue. I think a loader is needed such as [esmock](https://github.com/iambumblehead/esmock) but there is something in Jest pr ts-jest that prevents...

Probably right. I did end up switching to vitest during my experiments and tried there as well. What I was able to do - whichI think Jest can - is...

Not sure if same issue but with `nodenext` my code seems to transpile but shows errors in editor. I made a super simple sandbox [here](https://codesandbox.io/p/github/cyberwombat/ts-esm-test/draft/kind-sea?file=%2Findex.ts&workspace=%257B%2522activeFileId%2522%253A%2522cl9bh5ug20002lrhb6woealfc%2522%252C%2522openFiles%2522%253A%255B%255D%252C%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522gitSidebarPanel%2522%253A%2522COMMIT%2522%252C%2522sidekickItems%2522%253A%255B%257B%2522type%2522%253A%2522TERMINAL%2522%252C%2522shellId%2522%253A%2522cl9bh6bqv000blrhb74jv6h3z%2522%252C%2522key%2522%253A%2522cl9bh6b2o00523b6fhlt7a3mv%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D). Basically this code won't work...

Here's a basic text wrap code. You can get fancier with how you split etc but should be clear enough. ``` const writeTextWrap = (pdfWriter, text, params, options = {})...