const fs = require('fs');
const R = require('ramda');
const assert = require('assert');
const reporter = require('../lib/reporter');

const defaultMsg = fs.readFileSync('./lib/templates/noItems.md');
const testReporter = R.pipe(R.flip, R.curry)(reporter.reporter)(true);

describe('jshint-md-reporter', function () {

  describe('No Errors', function () {

    it('returns default message on undefined', function () {
      var result = testReporter(undefined);
      assert.equal(result, defaultMsg);
    });

    it('returns default message on null', function () {
      var result = testReporter(null);
      assert.equal(result, defaultMsg);
    });

    it('returns default message on empty string', function () {
      var result = testReporter('');
      assert.equal(result, defaultMsg);
    });

    it('returns default message on empty array', function () {
      var result = testReporter([]);
      assert.equal(result, defaultMsg);
    });

    it('returns default message on empty object', function () {
      var result = testReporter({});
      assert.equal(result, defaultMsg);
    });

  });

});

@@ -137,21 +137,88 @@
 nst 
-defaultMsg = 
+removeNewLines = R.replace(/%5E%5Cs+%7C%5Cs+$/g, '');%0Aconst defaultMsg = removeNewLines(
 fs.r
@@ -258,16 +258,28 @@
 ems.md')
+.toString())
 ;%0Aconst 
@@ -488,35 +488,37 @@
 tion () %7B%0A      
-var
+const
  result = testRe
@@ -639,35 +639,37 @@
 tion () %7B%0A      
-var
+const
  result = testRe
@@ -793,35 +793,37 @@
 tion () %7B%0A      
-var
+const
  result = testRe
@@ -944,35 +944,37 @@
 tion () %7B%0A      
-var
+const
  result = testRe
@@ -1108,11 +1108,13 @@
     
-var
+const
  res

Fix unit tests