Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: html-runner crashing because of missing process.stdout shim #1788

Merged
merged 1 commit into from
Jul 6, 2015

Conversation

sunesimonsen
Copy link
Contributor

Fixes: #1789

When running mocha in the browser you get a crash in the following code:

if (isatty) {
  exports.window.width = process.stdout.getWindowSize
      ? process.stdout.getWindowSize(1)[0]
      : tty.getWindowSize()[1];
}

That is because we need to shim the process.stdout before requiring
mocha from browser-entry.js, I fixed that by moving it to the top of the
file.

When running mocha in the browser you get a crash in the following code:

if (isatty) {
  exports.window.width = process.stdout.getWindowSize
      ? process.stdout.getWindowSize(1)[0]
      : tty.getWindowSize()[1];
}

That is because we need to shim the process.stdout before requiring
mocha from browser-entry.js, I fixed that by moving it to the top of the
file.
jbnicolai pushed a commit that referenced this pull request Jul 6, 2015
Fix: html-runner crashing because of missing process.stdout shim
@jbnicolai jbnicolai merged commit d29f7e9 into mochajs:master Jul 6, 2015
@jbnicolai
Copy link

Thank you very much. This again stresses the importance of #1732 and manual HTML reporter testing until then.

@sunesimonsen
Copy link
Contributor Author

@jbnicolai happy I could help :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

html-runner crashing because of missing process.stdout shim
2 participants