News for hackers. Stuff that matters.
Re:Meta Is Transferring Jest to the OpenJS Foundation by wrikl on Wednesday May 11, 2022 @10:39PM (#31348664)
That seems great, definitely going to check it out!

Do you know if there's a way to use that runner per-file or per-project within jest? Seems like that's the only way it'd be possible to smoothly migrate in a large codebase without rewriting all tests at once.

Re:Meta Is Transferring Jest to the OpenJS Foundation by cpojer on Wednesday May 11, 2022 @11:42PM (#31349032)
Jest supports multiple “projects” in a single invocation, and they can all use a different reporter.

You can define a base config for your repo, and then inherit two sub-configs from it each with different runners and mutually exclusive selection for tests (by suffix, folder, or any convention that works for you).

See https://jestjs.io/docs/configuration

Re:Meta Is Transferring Jest to the OpenJS Foundation by wrikl on Thursday May 12, 2022 @02:22AM (#31349929)
Thank you! We actually do use the "projects" feature, but we've found a fair number of options don't work when defined at the project level (a good example is `coverageThreshold` - we weren't able to make per-project thresholds work, at least in jest 26).

Glad that this one has the ability to be configured more granually - that'll come in handy for migrating gradually.