Currently the register method doesn't return the result of pirates#addHook, which means you can't revert the registration of the hook. This is very useful in circumstances like jest-config, which temporarily registers the transform, reads the config file, then de-registers it. See below
Currently the
register
method doesn't return the result ofpirates#addHook
, which means you can't revert the registration of the hook. This is very useful in circumstances likejest-config
, which temporarily registers the transform, reads the config file, then de-registers it. See belowhttps://github.com/facebook/jest/blob/199f9811ae68b15879cbe18b7ef7ebd61eefcf23/packages/jest-config/src/readConfigFileAndSetRootDir.ts#L83-L101