visionmedia/mocha — pull request #1039 by vnikiti (2013-11-16 17:48:30+00:00)
Title: Fix for NaN coming in time attribute when test fails.

When a test fails, division of duration property computes to NaN. An attempt to submit a report containing time="NaN" to Sonar throws an error and report gets rejected. To make Mocha XUnit compatible with Sonar, I propose this amazing change! This will return 0 when tests fail.