question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stryker returns only timeouts (mostly when using Jest)

See original GitHub issue

Summary

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:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:27 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
andreadellacortecommented, Feb 21, 2020

@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.

0reactions
brodybitscommented, May 6, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >
Bountysource
Stryker returns only timeouts (mostly when using Jest)
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found