I am trying to hook into Jest with the jest-runtime package but I noticed there is no documentation available for setting it up. It would be nice if documentation could be added to the package.
@Archcry what in particular are you trying to achieve?
Sorta related: #5048
Well, I am developing react support in Stryker. We currently do have a jest plug-in for Stryker which creates a context and runs tests on that context. This plug-in doesn't work with react projects unfortunately and that's why I am trying to figure out how all of this works. What I basically want is the following:
We mutate the users source-code and push it to the Jest plug-in in order to test is. Because we perform multiple test runs we want to run jest programmatically. In the current plug-in they create a hasteContext and run tests on the context. I just can't wrap my head around what the context does, why we have to provide the test files to the runTests function and how the jest configuration is interpreted and used. I've been trying to debug my way around the source-code but I don't really understand all of it :S
Closing because this is not an issue with Jest.
Can you use jest-editor-support for this? jest-runtime is not really made to be consumed directly - the API is a bit too hairy and non-defined for that
@cpojer, not having documentation for a package that is in the Jest repository and published on NPM sort of is an issue with Jest. I agree that what I want to do is not necessarily the problem of the Jest project but having API documentation for published packages is.
Yep, unfortunately we do not have time to write this documentation. If you have time to help us out, we'd greatly appreciated it.
Once I wrap my head around the code I'll try to contribute, thanks for the fast replies :)
Most helpful comment
Yep, unfortunately we do not have time to write this documentation. If you have time to help us out, we'd greatly appreciated it.