Skip to content

Commit

Permalink
Fixes the test based on CR
Browse files Browse the repository at this point in the history
  • Loading branch information
sul4bh committed Apr 20, 2017
1 parent 555a90a commit bb799c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/integration/fixtures/simple-reporter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const mocha = require('mocha');
var baseReporter = require('../../../lib/reporters/base');
module.exports = simplereporter;

function simplereporter (runner) {
mocha.reporters.Base.call(this, runner);
baseReporter.call(this, runner);

runner.on('suite', function (suite) {
console.log('on(\'suite\') called');
Expand Down
4 changes: 3 additions & 1 deletion test/integration/reporters.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,20 @@ describe('reporters', function () {

run('passing.fixture.js', args, function (err, result) {
assert(!err);
assert.equal(result.code, 0);
done();
});
});

it('loads a reporter from an absolute path', function (done) {
// Generates an absolute path string
var reporterAtAnAbsolutePath = process.cwd() + 'test/integration/fixtures/simple-reporter.js';
var reporterAtAnAbsolutePath = process.cwd() + '/test/integration/fixtures/simple-reporter.js';

var args = ['--reporter=' + reporterAtAnAbsolutePath];

run('passing.fixture.js', args, function (err, result) {
assert(!err);
assert.equal(result.code, 0);
done();
});
});
Expand Down

0 comments on commit bb799c2

Please sign in to comment.