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

Ability to disable some mutators #293

Closed
unlight opened this issue Apr 26, 2017 · 3 comments
Closed

Ability to disable some mutators #293

unlight opened this issue Apr 26, 2017 · 3 comments
Labels
🚀 Feature request New feature request

Comments

@unlight
Copy link

unlight commented Apr 26, 2017

Atm, stryker does not work with TypeScript, I need intermediate step to compiler ts source to at least to ES6.

Stryker mangles decorators which leads to guaranteed runtime exception.
Obviously, it is not very useful mutants.

-   FeatureRoutingModule = tslib_1.__decorate([
-       core_1.NgModule({
-           imports: [router_1.RouterModule.forChild(featureRoutes)],
-           exports: [router_1.RouterModule]
-       })
-   ], FeatureRoutingModule);
+   FeatureRoutingModule = tslib_1.__decorate([], FeatureRoutingModule);
@nicojs
Copy link
Member

nicojs commented Apr 26, 2017

True. We're working on native TypeScript support behind the scenes but it will take some.

In the mean time you might want to enable the importHelpers compiler flag. That would already help you quite a lot by minimizing the boiler plate code it would normally emit. But the example you give would still be there.

How would you like the disabling of mutators to work? Have a disabledMutators flag in the config? Every mutator has a name, in your example it is the ["ArrayDeclarator"] (https://github.com/stryker-mutator/stryker/blob/master/packages/stryker/src/mutators/ArrayDeclaratorMutator.ts)

It could look like this:

{
  disabledMutators: [
   'ArrayDeclarator',
   'BinaryOperator'
}

Its important to note that errors during mutation testing are reported separately as type error, which do not impact the mutation score (as explained in the FAQ)

@nicojs nicojs added the 🚀 Feature request New feature request label Apr 26, 2017
@shybyte
Copy link

shybyte commented Dec 15, 2017

This feature request seems to be a duplicate of #13.
@nicojs In #13 I have proposed a different config notation to disable mutations (similar to tslint). What do you think about it?

@nicojs
Copy link
Member

nicojs commented Dec 18, 2017

Duplicate of #13 (thanks @shybyte )

@nicojs nicojs closed this as completed Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Feature request New feature request
Projects
None yet
Development

No branches or pull requests

3 participants