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

Test nyan and progress reporters broken since 8.1.0 #4393

Closed
4 tasks done
jormaechea opened this issue Jul 31, 2020 · 5 comments · Fixed by #4394
Closed
4 tasks done

Test nyan and progress reporters broken since 8.1.0 #4393

jormaechea opened this issue Jul 31, 2020 · 5 comments · Fixed by #4394
Labels
type: bug a defect, confirmed by a maintainer

Comments

@jormaechea
Copy link

jormaechea commented Jul 31, 2020

Prerequisites

  • Checked that your issue hasn't already been filed by cross-referencing issues with the faq label
  • Checked next-gen ES issues and syntax problems by using the same environment and/or transpiler configuration without Mocha to ensure it isn't just a feature that actually isn't supported in the environment in question or a bug in your code.
  • 'Smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, your usage of Mocha, or Mocha itself
  • Ensured that there is no discrepancy between the locally and globally installed versions of Mocha. You can find them with: node node_modules/.bin/mocha --version(Local) and mocha --version(Global). We recommend that you not install Mocha globally.

Description

Running tests in the terminal (bash) with the nyan and progress reporters are broken, the output is a mess.

Steps to Reproduce

Run npx mocha -R nyan test.js or npx mocha -R progress test.js with the following file:

const assert = require('assert');

describe('Bug test', () => {

	for(let i = 0; i < 200; i++) {
		it('Should do something', () => assert(true));
	}

});

Expected behavior: [What you expect to happen]
The nyan cat or the progress bar shouldn't exceed terminal width.

Actual behavior: [What actually happens]

It breakes awfully, by exceeding the terminal width and generating unexpected line breaks.

Reproduces how often: [What percentage of the time does it reproduce?]
100%

Versions

  • The output of mocha --version and node node_modules/.bin/mocha --version: 8.1.0
  • The output of node --version: v12.14.1
  • Your operating system
    • name and version: Ubuntu 18.04
    • architecture (32 or 64-bit): 64-bit
  • Your shell (e.g., bash, zsh, PowerShell, cmd): bash
  • Your browser and version (if running browser tests):-
  • Any third-party Mocha-related modules (and their versions): -
  • Any code transpiler (e.g., TypeScript, CoffeeScript, Babel) being used (and its version): -

Additional Information

It works properly in 8.0.1

@jormaechea jormaechea changed the title Test nyan reporter broken since 8.1.0 Test nyan and progress reporters broken since 8.1.0 Jul 31, 2020
@RiccardoMargiotta
Copy link

RiccardoMargiotta commented Aug 3, 2020

I'm seeing similar line-break issues with the 'dot' reporter, also fine in 8.0.1.

8.0.1
image

8.1.0
image

@boneskull
Copy link
Member

yikes, ty.

@boneskull boneskull added type: bug a defect, confirmed by a maintainer and removed unconfirmed-bug labels Aug 4, 2020
@boneskull
Copy link
Member

I see the issue, will publish a fix soon

boneskull added a commit that referenced this issue Aug 4, 2020
looks like maybe a bad merge, but `isBrowser()` was used incorrectly
@boneskull
Copy link
Member

Ref: #4394

@boneskull boneskull linked a pull request Aug 4, 2020 that will close this issue
@boneskull
Copy link
Member

fixed in v8.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants