npm install mocha-json-report {
"src/test/unit/photo_model_test.js": [
{
"title": "should return photos",
"suite": "getFlickrPhotos(tags, tagmode, callback)",
"file": "src/test/unit/photo_model_test.js",
"duration": 1,
"state": "passed"
},
{
"title": "should return true for valid single search term",
"suite": "isValidCommaDelimitedList(value)",
"stack": "TypeError: Cannot read property 'new' of undefined\n at Context.
"message": "Cannot read property 'new' of undefined",
"file": "src/test/unit/form_validator_test.js",
"duration": 0,
"state": "failed"
},
{
"title": "should return false for search term containing numbers",
"suite": "isValidCommaDelimitedList(value)",
"file": "src/test/unit/form_validator_test.js",
"state": "skipped"
},
]
}
npm install mocha-json-report --save-dev
mocha-test configuration
mochaTest: {
coverage: {
options: {
reporter: 'mocha-json-report',
quiet: true,
captureFile: 'unit-tests.json'
},
src: [
'test.js'
]
}
}