stryker-js: Stryker returns only timeouts (mostly when using Jest)

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

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 27 (12 by maintainers)

Commits related to this issue

Most upvoted comments

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