[x] Checked that your issue hasn't already been filed by cross-referencing issues with the faq label
[x] 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.
[x] '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
[x] 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): -
Prerequisites
faq
labelnode node_modules/.bin/mocha --version
(Local) andmocha --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
ornpx mocha -R progress test.js
with the following file: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
mocha --version
andnode node_modules/.bin/mocha --version
: 8.1.0node --version
: v12.14.1Additional Information
It works properly in 8.0.1