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

feat(zero config): Support mutation testing without any configuration #1264

Merged
merged 14 commits into from
Dec 23, 2018

Conversation

nicojs
Copy link
Member

@nicojs nicojs commented Nov 30, 2018

Adds support to mutation test simple projects without any configuration. Comparable to webpack 4's support for zero config. Adds the following sane defaults:

mutate: ['{src,lib}/**/*.js?(x)',
    '!{src,lib}/**/__tests__/**/*.js?(x)',
    '!{src,lib}/**/?(*.)+(spec|test).js?(x)',
    '!{src,lib}/**/*+(Spec|Test).js?(x)']`,
Coverage analysis: 'off'

Prior to this PR, the command test runner already became the default.

Fixes #1051

  • Test runner: 'command'
  • Mutator: "javascript" (not doing anymore, see comment below)
  • Files to mutator: ['src/**/*.js', 'lib/**/*.js'] ['{src,lib}/**/*.js?(x)', '!{src,lib}/**/__tests__/**/*.js?(x)', '!{src,lib}/**/?(*.)+(spec|test).js?(x)', '!{src,lib}/**/*+(Spec|Test).js?(x)']
  • Don't log a warning if one of the mutate patterns didn't result in files AND it is the default pattern.
  • Coverage analysis: 'off' (it is 'perTest' now, but the CommandTestRunner does not support it)
  • Document new default values in readme

@ghost ghost assigned nicojs Nov 30, 2018
@ghost ghost added the 🔎 Needs review label Nov 30, 2018
@nicojs
Copy link
Member Author

nicojs commented Nov 30, 2018

@stryker-mutator/contributors what do you guys think about leaving the mutator to "es5" for now? Update it when we release Stryker 1.0? To reduce the amount of breaking changes introduced by this PR

@nicojs nicojs changed the title WIP: zero config runs feat(zero config): Support mutation testing without any configuration Nov 30, 2018
@mthmulders
Copy link
Contributor

I would opt for keeping the number of breaking changes in this feature as low as possible.

@nicojs
Copy link
Member Author

nicojs commented Dec 19, 2018

This PR is ready for review. @mthmulders @simondel @Archcry, welcome to take this.

@bartekleon
Copy link
Member

@nicojs I understand this is zero tests for JS only? (no TS support I see)

@simondel
Copy link
Member

simondel commented Dec 19, 2018 via email

@nicojs
Copy link
Member Author

nicojs commented Dec 22, 2018

Thanks for your review @mthmulders! I've implemented your review comments. Did you have a look at everything? If you're happy, I think we can merge it.

@nicojs
Copy link
Member Author

nicojs commented Dec 23, 2018

Haha, sorry @mthmulders. We might need to need to revert back to my beautiful for statement. 😂

InputFileResolver
       when a globbing expression does not result in a result
         should not log a warning if the globbing expression was the default logging expression:
     TypeError: arr2.values is not a function

Node 6 doesn't support this magic. We're dropping node 6 support April 30th, so be patient.

EDIT: Apparently node 8 doesn't support it as well. April 30th 2020 is your day!

@nicojs nicojs merged commit fe8f696 into master Dec 23, 2018
@nicojs nicojs deleted the 1051-zero-config-runs branch December 23, 2018 10:25
@ghost ghost removed the 🔎 Needs review label Dec 23, 2018
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

Successfully merging this pull request may close these issues.

4 participants