Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8759173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:44:05+00:00 2026-06-13T14:44:05+00:00

I try to use mocha with webstorm test runner on win 7. I have

  • 0

I try to use mocha with webstorm test runner on win 7.

I have these config params:

  • path to node:

    C:\Program Files (x86)\nodejs\node.exe
    

    working directory:

    D:\creation\software developer\projects\dev\document root\
    

    path to node app js file:

    C:\Users\inf3rno\node_modules\mocha\bin\_mocha
    

    application parameters:

    test
    

I got the following error message in webstorm console

✖ 1 of 1 test failed:

but nothing about which test failed. :S

How to fix it?

(in git bash I got a detailed error message, so mocha is installed well)

Tried with different reporters, but none of them seems working. The problem is with the Error object I think. Everything else is displayed well.

Wrote a custom reporter and found that it’s fully random whether the stack shows up on the webstorm console, or not. The best choice was to print it with process.stderr.write, with console.log or process.stdout.write appears nothing. I don’t know why is that. Maybe it’s some type of timeout, but I set the timeout to 9999999. :S :S :S Hmm maybe the webstorm runner has a timeout, and it depends on that, not on the mocha timeout settings…

Tested with this reporter:

exports = module.exports = WebStorm;

/**
 * Initialize a new `WebStorm` test reporter.
 *
 * @param {Runner} runner
 * @api public
 */

 //decribe -> suite
 //it -> test

function WebStorm(runner) {
  var buffer = [];
  var suites = [];
  var fails = [];

  runner.on("suite", function(suite){
     suites.push(suite.title || "''");
  });

  runner.on("suite end", function(suite){
     if (fails.length > 0)
         buffer.push("describe "+suites.join(".")+"\n"+fails.join("\n"));
     fails = [];
     suites.pop();
  });

  runner.on("fail", function(test, err){
      fails.push("  it fail "+test.fullTitle() + err.message);
  });

  runner.on("end", function (){
      process.stderr.write(buffer.length+"\n");
      //process.stderr.write(buffer.join("\n"));
  });
}

I found it does not really matter how long the output text is, just how long you have to wait before displaying it. So I still think it’s a timeout problem, and not an stdout bug. The webstorm console returns: “Process finished with exit code 59” which means “An unexpected network error occured.”

Changed to jasmine-node, it’s working.

Edit:

I changed to jasmine2, it had the same issue on windows. The simplest workaround is deferring process.exit for example with 1ms. So it cannot exit before the end of the stdout.write. (Manually flushing the stdout and calling exit only after that is probably a working solution as well.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:44:07+00:00Added an answer on June 13, 2026 at 2:44 pm

    It’s caused by a known Windows specific node issue, also logged in JetBrains issue tracker.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to work with DirectoryInfo, FileInfo with very long path. I try use
I have a problem with Automapper when I try use custom resolver which uses
Hi i try use Nlog in with caliburn micro, I have use this tutorial
I have gotten some reports from users of crashes when try use my application
I have problems with PHP in Ubuntu 10.04. When I try use mysqli_result::fetch_all this
I try use string as a regular expression pattern but I've following errors PHP
I try use a integer array in java with the code below: public static
I try to use a variable in my kshell script but can't get a
I try to use the great particle emitter which Michael Daley build for his
I try to use SQL SERVER VIEW within RIA Services. So I created some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.