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

Config for watch mode to ignore process.exit(exitCode); #9

Open
Ronsku opened this issue Apr 8, 2017 · 2 comments
Open

Config for watch mode to ignore process.exit(exitCode); #9

Ronsku opened this issue Apr 8, 2017 · 2 comments

Comments

@Ronsku
Copy link

Ronsku commented Apr 8, 2017

Hi,

Could we have a function to run this in watch mode with a configuration watch: true or similar to not have process.exit(exitCode); happening when code coverage is not fulfilled?

This is a very easy change and I can make a PR if needed.

// local - karma.conf.js:
istanbulThresholdReporter: {
  src: 'coverage/coverage-final.json',
  reporters: ['text'],
  watch: true,
  ...
}

// karma-istanbul-threshold - index.js
_.defaults(config.istanbulThresholdReporter, {
  src: null,
  basePath: null,
  watch: false
  ...
}

...

if (exitCode && !config.istanbulThresholdReporter.watch) {
  process.exit(exitCode);
}

Thank you!

@vjcagay
Copy link

vjcagay commented Jan 15, 2018

I would also like this change. I it would be nice if this plugin does not stop Karma in watch mode if thresholds are not fulfilled.

@philipptri
Copy link
Member

@vjcagay feel free to make a PR to add this feature. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants