Stryker returns only timeouts (mostly when using Jest)
See original GitHub issueSummary
When I run stryker on Jest tests, I get only timeout results. Running with logLevel: ‘trace’ gives this output:
[2018-02-07 08:56:27.944] [TRACE] TestRunnerChildProcessAdapter - [2018-02-07 08:56:27.943] [DEBUG] IsolatedTestRunnerAdapterWorker - UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): error
[2018-02-07 08:56:28.040] [TRACE] TestRunnerChildProcessAdapter - [2018-02-07 08:56:28.040] [DEBUG] IsolatedTestRunnerAdapterWorker - UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: timeout
[2018-02-07 08:56:28.044] [TRACE] TestRunnerChildProcessAdapter - [2018-02-07 08:56:28.044] [DEBUG] IsolatedTestRunnerAdapterWorker - UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: timeout
[2018-02-07 08:56:28.636] [TRACE] TestRunnerChildProcessAdapter - [2018-02-07 08:56:28.635] [DEBUG] IsolatedTestRunnerAdapterWorker - UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: User unknown
Stryker config
const path = require('path');
module.exports = function(config) {
config.set({
files: [
{
pattern: 'src/app/AppRoot.js',
mutated: true,
included: false,
},
'src/public/**/*',
'src/app/**/*.scss',
'src/app/**/AppRoot.spec.js',
'src/app/**/AppRoot.spec.js.snap',
'src/**/*',
'test/*',
'development/*',
],
testRunner: 'jest',
mutator: 'javascript',
transpilers: ['babel'],
reporter: ['html', 'clear-text', 'progress'],
coverageAnalysis: 'off',
babelrcFile: '.babelrc',
jest: {
config: require(path.resolve(__dirname, './test/jest.config.json')),
},
});
};
Stryker environment
├─┬ stryker@0.18.2
├─┬ stryker-api@0.12.0
├─┬ stryker-babel-transpiler@0.2.4
├─┬ stryker-html-reporter@0.11.5
├─┬ stryker-javascript-mutator@0.3.3
├─┬ stryker-jest-runner@0.4.0
├─┬ stryker-webpack-transpiler@0.1.2
Your Environment
software | version(s) |
---|---|
node | v8.9.4 |
npm | v.5.5.1 |
Operating System | macOS v10.13.2 |
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:27 (12 by maintainers)
Top Results From Across the Web
Troubleshooting | Stryker Mutator
Below you'll find an ever-growing list of issues that you might occur when running StrykerJS on your project for the first time.
Read more >Trouble with Stryker and Jest - Stack Overflow
I'm testing Stryker with Jest. Stryker seems to don't apply Jest test. The two mutants don't pass test if I introduce them manually...
Read more >stryker-mutator/stryker - Gitter
I would like to know, how to contribute to stryker-jest-runner. coverageAnalysis is an important feature, and I am very interesting to speedup my...
Read more >Mutation Testing in JavaScript Using Stryker | Shing's Blog
The goal of mutation testing is to kill all mutants by enhancing the test suite. Although 100% kill is usually impossible for even...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jimmyandrade I solved it on my side - I think the issue was I wasn’t using the “smart” jest runner but just running jest directly as a command, which caused all kind of issues.
I think the option in stryker.conf.js was renamed to
timeoutMS
, wasted a few minutes before I checked it in README.md. Just a drive-by comment in case it may help someone else, landed here with help from Google.