esbuild-jest
esbuild-jest copied to clipboard
Can't use the world `Block` anywhere in test file
I was getting strange compilation errors in ESM and finally narrowed it down to my usage of the word Block anywhere in source code. This included comments, tried moving it around everywhere as well.
Eventually found this: https://github.com/aelbore/esbuild-jest/blob/master/src/index.ts#L33
So...guess that TODO has come home to roost
I think I just hit this too. 😬
I encountered the same issue with a function called clock.
The problem is the word ock, it is parsed and interpreted somewhere.
yep, see https://github.com/aelbore/esbuild-jest/pull/44#issuecomment-893481820
Does anyone know the historical reason for this? What a stupid decision it seems now. It killed my whole day
How does this issue exist, and how is it not even acknowledged? Is the esbuild-jest community just not using mocks? How did someone think https://github.com/aelbore/esbuild-jest/blob/master/src/index.ts#L33 was acceptable?