[jest-transform]: add a new option to transformOptions
to detect when jest runs in watch mode
#11118
Labels
transformOptions
to detect when jest runs in watch mode
#11118
🚀 Feature Proposal
A new option for
transformOptions
to tell transformers if Jest runs in watch mode.Motivation
I have a scenario in
ts-jest
related to kulshekhar/ts-jest#943foo.ts
tots-jest
doesn't know if Jest runs in watch mode to properly redo type checkExample
A new option for
transformOptions
can be named something likewatchMode
andts-jest
can use that.Currently I'm using a workaround that I have a check
process.argv.includes('--watch')
, it works but not optimal.Pitch
Allow transformers to perform certain logic depending on watch mode
cc @SimenB @thymikee
The text was updated successfully, but these errors were encountered: