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 quits with "TypeError: Cannot read property 'runResult' of undefined"

See original GitHub issue

I’m unable to run stryker on my current project. Error log and config below:

Error log

[2017-08-02 15:54:40.571] [WARN] InputFileResolver - Globbing expression "test/unit/**/*.js" did not result in any files.
[2017-08-02 15:54:40.595] [INFO] InputFileResolver - Found 33 of 33 file(s) to be mutated.
[2017-08-02 15:54:40.597] [INFO] SandboxCoordinator - Starting initial test run. This may take a while.
[2017-08-02 15:54:41.787] [ERROR] Stryker - One or more tests errored in the initial test run:
        TypeError: Cannot read property 'runResult' of undefined
TypeError: Cannot read property 'runResult' of undefined

stryker.conf.js

module.exports = function(config){
  config.set({
    files: [
      'test/unit/**/*.js',
      { pattern: 'src/**/*.js', included: false, mutated: true }
    ],
    testFramework: 'mocha',
    testRunner: 'mocha',
    reporter: ['progress', 'clear-text', 'dots', 'html', 'event-recorder'],
    coverageAnalysis: 'off',
    plugins: ['stryker-mocha-runner', 'stryker-html-reporter']
  });
};

Command I’m running to generate this error:

./node_modules/.bin/babel-node ./node_modules/.bin/stryker run

Note: I’ve had a look in the .stryker-tmp directory, and the ___testHooksForStryker.js file is empty. Assuming this is incorrect?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
simondelcommented, Aug 25, 2017

Hi! We fixed the original error so the issue has been closed. Please upgrade to:

  • stryker-api@0.8.0
  • stryker-html-reporter@0.7.0
  • stryker-mocha-framework@0.4.0
  • stryker-mocha-runner@0.7.0
  • stryker@0.9.0
0reactions
nicojscommented, Aug 3, 2017

If the error is with the CoverageInstrumenterStream , can it be that you changed the coverageAnalysis setting to something other than 'off'? If coverage instrumentation is 'off' it should not try to instrument for code coverage.

That being said: we we’re not supporting es6 syntax natively yet. A feature request for it can be found here: https://github.com/stryker-mutator/stryker/issues/133. To make it work, we’re starting to migrate to more language agnostic way of working, as can be read in our latest blog article. So it might take some time before we natively support things like the import statement.

For the time being, you can use stryker by first transpiling the code yourself before handing it of to Stryker. First make sure your normal unit tests are passing when ran over the transpiled code though.

Lets keep this issue about the original error message. If you run into anything else, please feel free to update #133 or report new issues when they arise.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stryker quits with "TypeError: Cannot read property 'runResult ...
I'm unable to run stryker on my current project. ... Stryker quits with "TypeError: Cannot read property 'runResult' of undefined" #347.
Read more >
JavaScript error: Uncaught TypeError: Cannot read property ...
So querySelectorAll returns an empty NodeList which has undefined at the 0 position (or any position for that matter). Breakdown of what is...
Read more >
cypress-io/cypress - Gitter
Just to clarify: cypress "cannot see" fetch request that it is why we need to remove it from window or add polyfill, to...
Read more >
Untitled
Joop jump 50ml, Udaya lokuarachchi, Mt shasta volcano mud run results, ... Caslino, Arnedo balneario, Spanish food label reading, Iot hidden menu download, ......
Read more >
Untitled
Zveri prosto takaya tekst, Garage style sheds, Club dance house charts, ... Plunging toilet doesn't work, Flower power magic revealed, Scorecast bet, ...
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