I'm sure something is not so obvious with me!
I read the instructions here ( https://github.com/visionmedia/mocha/wiki/Third-party-reporters ), and took my code and added as a new node module (i.e. it is within node_modules/my-reporter/reporter.js). However, I cannot get mocha to download this reporter.
I tried many variations ...
mocha allTests.js -R ./node_modules/my-reporter/reporter.js
mocha allTests.js -R my-reporter
But nothing works: - (
I can successfully upload my reporter to a JS file:
my_reporter = require('./node_modules/my-reporter/reporter.js')
console.log(my_reporter);
Does anyone have any clues?
source
share