-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency filetype: buga defect, confirmed by a maintainera defect, confirmed by a maintainer
Description
Description
Mocha never ends with big error messages
Steps to Reproduce
const {expect} = require('chai')
it('Test failing', function () {
const longArray = _.times(10000, function (i) {
return {a : i}
})
const shortArray = []
expect(longArray).deep.equal(shortArray)
})
Then execute yarn mocha test --exit
, the test will execute it will be marked as failure, but the summary will never appear and the process will not exit.
If on contrary one writes:
const {expect} = require('chai')
it('Test failing', function () {
const longArray = _.times(10000, function (i) {
return {a : i}
})
const shortArray = []
try {
expect(longArray).deep.equal(shortArray)
} catch (e) {
console.error(e)
throw new Error('Small error')
}
})
The test fails and it displays an error in the summary. Error is logged without any problem.
Expected behavior: [What you expect to happen]
Mocha should be able to exit the process even if the error is overly long. Maybe the message could be reduced?
Actual behavior: [What actually happens]
The process hangs forever
Reproduces how often: [What percentage of the time does it reproduce?]
Always
Versions
Mocha 5.1.1
- The output of
mocha --version
andnode node_modules/.bin/mocha --version
: - The output of
node --version
:
v8.11.2 - The version and architecture of your operating system:
Ubuntu - Your shell (bash, zsh, PowerShell, cmd, etc.):
bash - Your browser and version (if running browser tests):
- Any other third party Mocha related modules (with versions):
- The code transpiler being used:
CareLuLu-Gabriel and kevinoid
Metadata
Metadata
Assignees
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency filetype: buga defect, confirmed by a maintainera defect, confirmed by a maintainer