Mocha Fivemat Progress Reporter

0.1.0 · abandoned · verified Tue Apr 21

The `mocha-fivemat-progress-reporter` package offers a specialized test reporter for the Mocha JavaScript test framework. It is designed to combine the minimalist, progress-oriented feedback of Mocha's built-in progress reporter with the condensed, informative output style of the `fivemat` reporter. This reporter visualizes test execution with a per-test-suite progress bar, providing immediate visual cues on test progress. Currently at version 0.1.0, the package was last published approximately 10 years ago (June 2016), indicating that it is no longer actively maintained. Its core differentiation lies in offering a hybrid reporting style that aims to provide both a quick overview of ongoing tests and a concise summary upon completion, making it distinct from verbose or solely progress-based reporters.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to install `mocha-fivemat-progress-reporter` and use it as a custom reporter for Mocha tests via the command line. It includes a `package.json` setup and a basic test file.

{
  "name": "my-project",
  "version": "1.0.0",
  "description": "A project using mocha-fivemat-progress-reporter",
  "devDependencies": {
    "mocha": "^8.0.0",
    "mocha-fivemat-progress-reporter": "^0.1.0"
  },
  "scripts": {
    "test": "mocha -R mocha-fivemat-progress-reporter"
  }
}

// test/example.test.js
const assert = require('assert');

describe('Array', function() {
  describe('#indexOf()', function() {
    it('should return -1 when the value is not present', function() {
      assert.equal([1, 2, 3].indexOf(4), -1);
    });

    it('should return the correct index when the value is present', function() {
      assert.equal([1, 2, 3].indexOf(2), 1);
    });

    it('should handle zero correctly', function() {
      assert.equal([0, 1, 2].indexOf(0), 0);
    });
  });

  describe('String', function() {
    it('should return the length of the string', function() {
      assert.equal('hello'.length, 5);
    });

    it('should concatenate strings', function() {
      assert.equal('hello' + 'world', 'helloworld');
    });
  });
});

// To run: 
// 1. npm install
// 2. npm test

view raw JSON →