-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
Description
EcmaScript Modules can (actually must, but easy to wrap the sync stuff in a promise) resolve asynchronously. While it's in no way a blocker for ESM support in Jest, it would be nice to add support for async transforms to be used.
This logic should for now not impact anything in Jest beyond @jest/transform
as Jest wouldn't use it until ESM support is in place.
I'm thinking we can add a .transformAsync
and .transformSourceAsync
to the ScriptTransformer
class.
There are some checks and verifications that process
is a function - we need to make sure there is one clear code path for sync and one for async transformation that verify the provided reporter implements the correct interface.
Sort of reopening #5556 and all its linked issues.
pascalduez, rgbabaev, skeggse, camjackson, benmccann and 2 more