How to use mocha-junit-reporter - 2 common examples

To help you get started, we’ve selected a few mocha-junit-reporter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DonJayamanne / pythonVSCode / .mocha-reporter / mocha-vsts-reporter.js View on Github external
function MochaVstsReporter(runner, options) {
  MochaJUnitReporter.call(this, runner, options);
  var INDENT_BASE = '  ';
  var indenter = '';
  var indentLevel = 0;
  var passes = 0;
  var failures = 0;
  var skipped = 0;

  runner.on('suite', function(suite){
    if (suite.root === true){
      console.log('Begin test run.............');
      indentLevel++;
      indenter = INDENT_BASE.repeat(indentLevel);
    } else {
      console.log('%sStart "%s"', indenter, suite.title);
      indentLevel++;
      indenter = INDENT_BASE.repeat(indentLevel);
github DonJayamanne / pythonVSCode / build / ci / mocha-vsts-reporter.js View on Github external
function MochaVstsReporter(runner, options) {
  MochaJUnitReporter.call(this, runner, options);
  var INDENT_BASE = '  ';
  var indenter = '';
  var indentLevel = 0;
  var passes = 0;
  var failures = 0;
  var skipped = 0;

  runner.on('suite', function(suite){
    if (suite.root === true){
      indentLevel++;
      indenter = INDENT_BASE.repeat(indentLevel);
    } else {
      indentLevel++;
      indenter = INDENT_BASE.repeat(indentLevel);
    }
  });

mocha-junit-reporter

A JUnit reporter for mocha.

MIT
Latest version published 10 months ago

Package Health Score

77 / 100
Full package analysis

Popular mocha-junit-reporter functions