Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an error when fn===undefined (#3580)
* Fix an error when fn===undefined This change fixes an error that occurs when reporter is 'xunit' and run is called without callback: " /rbd/pnpm-volume/a49b9a7c-c3f0-42ba-ae66-612ead86e96c/node_modules/.registry.npmjs.org/mocha/5.2.0/node_modules/mocha/lib/reporters/xunit.js:126 fn(failures); ^ TypeError: fn is not a function " * Add test `.reporter("xunit").run(fn)` This test has `try catch` block to catch an error if it occurs and write it to the console. * formatting * Update mocha.spec.js
- Loading branch information