Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: Jest 20: collectCoverage not passed to processor in config object any longer #3524

Closed
joscha opened this issue May 8, 2017 · 2 comments

Comments

@joscha
Copy link

joscha commented May 8, 2017

Do you want to request a feature or report a bug?

bug

What is the current behavior?

when using a preprocessor like:

function process(src, path, config, transformOptions) {
}
exports.process = process;

config does no longer contain the collectCoverage flag as part of the config object.

What is the expected behavior?

config has the collectCoverage flag based on the collectCoverage config setting or --coverage CLI flag.
ts-jest is using this flag to change some options regarding coverage collection, see kulshekhar/ts-jest#202 and kulshekhar/ts-jest#201

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.

Jest 20.0.0
yarn v0.23.2
node v7.10.0
OSX Sierra

@thymikee
Copy link
Collaborator

I think this is undocumented breaking change. We've redesigned script transformation and now it takes fourth parameter with instrument flag:

function process(src, path, projectConfig, {instrument: true) {
  // stuff
}
exports.process = process;

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants
@cpojer @joscha @thymikee and others