mocha-report-log

0.0.4 • Public • Published

Mocha Report Log

Build Status

Simplifies colored logging from mocha tests.

Installation

npm install mocha-report-log

Usage

var assert = require('assert');
var mochaLog = require('../script.js');
describe('Array', function () {
  describe('#indexOf()', function () {
    afterEach(function () {
      // runs after each test in this block
      console.log();
    });
    it('should return -1 when the value is not present', function () {
      mochaLog('Some important info');
      assert.equal(-1, [1, 2, 3].indexOf(4));
    });
 
 
    it('should also return -1 when the value is not present', function () {
      mochaLog('Other important info');
      mochaLog('Something went wrong?', 4, 'fail');
      assert.equal(-1, [1, 2, 3].indexOf(4));
    });
  });
});

Arguments

/**
 *
 * @param {string} data what you want to log
 * @param {int} [level] tabulation level
 * @param {string} [type] log type - fail, pass or pending
 */

Readme

Keywords

Package Sidebar

Install

npm i mocha-report-log

Weekly Downloads

5

Version

0.0.4

License

MIT

Unpacked Size

3.97 kB

Total Files

6

Last publish

Collaborators

  • jehy-true