How to use the reporters function from mocha
Find comprehensive JavaScript mocha.reporters code examples handpicked from public code repositorys.
22 23 24 25 26 27 28 29 30
var _mocha = require('mocha'); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var debug = require('debug')('mocha-ci-slack-reporter'); var Base = _mocha.reporters.Base; var Reporter = function (_Base) { (0, _inherits3.default)(Reporter, _Base);
5
2
3
45 46 47 48 49 50 51 52 53 54
EVENT_TEST_PENDING, // test pending } = Mocha.Runner.constants; const { Base, } = Mocha.reporters; const { cursor, color, } = Base;
3
185
9
17 18 19 20 21 22 23 24 25 26
* @property {string} [file] * @property {boolean} [keepFailed] * @property {string|Mocha.ReporterConstructor} [reporter] * @property {*} [reporterOptions] */ class FailedTestsReporter extends Mocha.reporters.Base { /** * @param {Mocha.Runner} runner * @param {{ reporterOptions?: ReporterOptions }} [options] */
0
0
1
+ 4 other calls in file
GitHub: crazypop000/vscode
41 42 43 44 45 46 47 48 49 50 51
const withReporter = (function () { if (argv.tfs) { { return (browserType, runner) => { new mocha.reporters.Spec(runner); new MochaJUnitReporter(runner, { reporterOptions: { testsuitesTitle: `${argv.tfs} ${process.platform}`, mochaFile: process.env.BUILD_ARTIFACTSTAGINGDIRECTORY ? path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${process.arch}-${browserType}-${argv.tfs.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`) : undefined
0
0
1
+ 5 other calls in file
23 24 25 26 27 28 29 30 31 32 33 34 35
EVENT_TEST_RETRY } = Mocha.Runner.constants, {inherits} = Mocha.utils, Base = Mocha.reporters.Base, color = Base.color; exports = module.exports = SpecWithRetries;
0
0
0
mocha.utils is the most popular function in mocha (4328 examples)